Skip to content

Commit

Permalink
Fix heap buffer overflow in URLAsset handling
Browse files Browse the repository at this point in the history
  • Loading branch information
nikias committed Jul 1, 2024
1 parent 1d0821a commit 26613f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/restore.c
Original file line number Diff line number Diff line change
Expand Up @@ -1235,7 +1235,7 @@ static size_t _curl_header_callback(char* buffer, size_t size, size_t nitems, vo
key[i] = '\0';
i++;
while (i < len && buffer[i] == ' ' || buffer[i] == '\t') i++;
val = malloc(len-i);
val = malloc(len-i+1);
strncpy(val, buffer+i, len-i);
val[len-i] = '\0';
break;
Expand Down

0 comments on commit 26613f9

Please sign in to comment.