Skip to content

Commit 5c77cc4

Browse files
committed
fix(wasm.c): increase auth_header size
1 parent 9df86d1 commit 5c77cc4

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

wasm.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@
3636

3737
// MARK: - WASM -
3838

39+
#define AUTH_HEADER_MAXSIZE 4096
40+
3941
char *substr(const char *start, const char *end) {
4042
size_t len = end - start;
4143
char *out = (char *)malloc(len + 1);
@@ -82,7 +84,7 @@ NETWORK_RESULT network_receive_buffer (network_data *data, const char *endpoint,
8284
}
8385

8486
// Authorization
85-
char auth_header[256];
87+
char auth_header[AUTH_HEADER_MAXSIZE];
8688
if (authentication) {
8789
snprintf(auth_header, sizeof(auth_header), "Bearer %s", authentication);
8890
headers[h++] = "Authorization";
@@ -163,7 +165,7 @@ bool network_send_buffer(network_data *data, const char *endpoint, const char *a
163165
int h = 0;
164166
headers[h++] = "Accept";
165167
headers[h++] = "text/plain";
166-
char auth_header[256];
168+
char auth_header[AUTH_HEADER_MAXSIZE];
167169
if (authentication) {
168170
snprintf(auth_header, sizeof(auth_header), "Bearer %s", authentication);
169171
headers[h++] = "Authorization";

0 commit comments

Comments
 (0)