diff options
author | Nikias Bassen | 2024-07-01 18:44:08 +0200 |
---|---|---|
committer | Nikias Bassen | 2024-07-01 18:44:08 +0200 |
commit | 26613f928cb32fa29e31310d0e330c9c3c32085c (patch) | |
tree | 5790683012e2120e301ff8a0da9ca436cf9a4ae6 | |
parent | 1d0821a79011fb5414ede7fdcb5ce4bfcee6958c (diff) | |
download | idevicerestore-26613f928cb32fa29e31310d0e330c9c3c32085c.tar.gz idevicerestore-26613f928cb32fa29e31310d0e330c9c3c32085c.tar.bz2 |
Fix heap buffer overflow in URLAsset handling
-rw-r--r-- | src/restore.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/restore.c b/src/restore.c index 5c6011f..d3828f9 100644 --- a/src/restore.c +++ b/src/restore.c @@ -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; |