Permalink
Browse files

http-client: Avoid NULL deref

  • Loading branch information...
1 parent 81c5dad commit 3e6a5c27d79a2aaf7aefaf5501082cb306565639 @andoma committed Mar 11, 2013
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/fileaccess/fa_http.c
View
@@ -2991,7 +2991,8 @@ http_request(const char *url, const char **arguments,
size = z.total_out;
}
- buf[size] = 0;
+ if(buf != NULL)
+ buf[size] = 0;
if(result != NULL) {
*result = buf_create_and_adopt(size, buf, &free);
} else {

0 comments on commit 3e6a5c2

Please sign in to comment.