Skip to content

Commit c2e8087

Browse files
committed
fix(wasm.c): increase auth_header size
1 parent 6ae0860 commit c2e8087

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
@@ -47,6 +47,8 @@
4747

4848
// MARK: - WASM -
4949

50+
#define AUTH_HEADER_MAXSIZE 4096
51+
5052
char *substr(const char *start, const char *end) {
5153
size_t len = end - start;
5254
char *out = (char *)malloc(len + 1);
@@ -93,7 +95,7 @@ NETWORK_RESULT network_receive_buffer (network_data *data, const char *endpoint,
9395
}
9496

9597
// Authorization
96-
char auth_header[256];
98+
char auth_header[AUTH_HEADER_MAXSIZE];
9799
if (authentication) {
98100
snprintf(auth_header, sizeof(auth_header), "Bearer %s", authentication);
99101
headers[h++] = "Authorization";
@@ -174,7 +176,7 @@ bool network_send_buffer(network_data *data, const char *endpoint, const char *a
174176
int h = 0;
175177
headers[h++] = "Accept";
176178
headers[h++] = "text/plain";
177-
char auth_header[256];
179+
char auth_header[AUTH_HEADER_MAXSIZE];
178180
if (authentication) {
179181
snprintf(auth_header, sizeof(auth_header), "Bearer %s", authentication);
180182
headers[h++] = "Authorization";

0 commit comments

Comments
 (0)