Skip to content
Snippets Groups Projects
Commit ccfce894 authored by Yang Tse's avatar Yang Tse
Browse files

Null terminate string in buffer before feeding it to strtol()

parent 700cd580
No related branches found
No related tags found
No related merge requests found
......@@ -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))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment