aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2002-06-11 07:20:21 +0000
committerDaniel Stenberg <daniel@haxx.se>2002-06-11 07:20:21 +0000
commitfc37ef9e4b9cd4a385d9d6104ba144da334f67b6 (patch)
tree89902e08b027caf8b2346380f40d8746813b691b
parent11ba367fc9abaeef3d140d1df7561af99a9bc8e5 (diff)
make sure data->set.postfields is non-NULL before doing strlen() on the
pointer. Bugs item #566835.
-rw-r--r--lib/http.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/http.c b/lib/http.c
index cc4ac8fe1..b135912bb 100644
--- a/lib/http.c
+++ b/lib/http.c
@@ -924,8 +924,9 @@ CURLcode Curl_http(struct connectdata *conn)
actually set your own */
add_bufferf(req_buffer,
"Content-Length: %d\r\n",
- (data->set.postfieldsize?data->set.postfieldsize:
- strlen(data->set.postfields)) );
+ data->set.postfieldsize?
+ data->set.postfieldsize:
+ (data->set.postfields?strlen(data->set.postfields):0) );
if(!checkheaders(data, "Content-Type:"))
add_bufferf(req_buffer,