Skip to content
Snippets Groups Projects
Commit 6cc71a6f authored by deuce's avatar deuce
Browse files

Only terminate error if it's non-null.

parent 5d1b5d5d
No related branches found
No related tags found
No related merge requests found
......@@ -187,9 +187,10 @@ int http_get_fd(char *URL, size_t *len, char *error)
return(-1);
}
if(atoi(header+9)!=200) {
if(error != NULL)
if(error != NULL) {
strncpy(error, header, 128);
error[127]=0;
error[127]=0;
}
close(s);
return(-1);
}
......
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