From 0f19e0145aa0167167dc3c6b0e39d531325810d5 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Wed, 5 Oct 2011 19:33:46 +0200 Subject: [PATCH] curl tool: OOM handling fixes --- src/tool_getparam.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/tool_getparam.c b/src/tool_getparam.c index 1c92e05..f18c916 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 -- 2.7.4