From: Yang Tse Date: Wed, 5 Oct 2011 17:33:46 +0000 (+0200) Subject: curl tool: OOM handling fixes X-Git-Tag: curl-7_23_0~99 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0f19e0145aa0167167dc3c6b0e39d531325810d5;p=curl curl tool: OOM handling fixes --- diff --git a/src/tool_getparam.c b/src/tool_getparam.c index 1c92e053a..f18c9168e 100644 --- a/src/tool_getparam.c +++ b/src/tool_getparam.c @@ -1016,7 +1016,8 @@ ParameterError getparameter(char *flag, /* f or -long-flag */ } else { GetStr(&postdata, nextarg); - size = strlen(postdata); + if(postdata) + size = strlen(postdata); } #ifdef CURL_DOES_CONVERSIONS