make sure data->set.postfields is non-NULL before doing strlen() on the

pointer. Bugs item #566835.
This commit is contained in:
Daniel Stenberg 2002-06-11 07:20:21 +00:00
parent 11ba367fc9
commit fc37ef9e4b

View File

@ -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,