mirror of
https://github.com/moparisthebest/curl
synced 2024-08-13 17:03:50 -04:00
Null terminate string in buffer before feeding it to strtol()
This commit is contained in:
parent
700cd5805c
commit
ccfce89423
@ -290,6 +290,7 @@ static int juggle(curl_socket_t *sockfdp,
|
||||
|
||||
if(5 != read(fileno(stdin), buffer, 5))
|
||||
return FALSE;
|
||||
buffer[4] = '\0';
|
||||
|
||||
len = (ssize_t)strtol((char *)buffer, NULL, 16);
|
||||
if(len != read(fileno(stdin), buffer, len))
|
||||
|
Loading…
Reference in New Issue
Block a user