aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2011-10-05 19:33:46 +0200
committerYang Tse <yangsita@gmail.com>2011-10-05 19:33:46 +0200
commit0f19e0145aa0167167dc3c6b0e39d531325810d5 (patch)
tree6a424162d63626f66c62bf21f66f626c4d147901
parentec73fd89ed5b526548e61527037e1603234333a0 (diff)
curl tool: OOM handling fixes
-rw-r--r--src/tool_getparam.c3
1 files changed, 2 insertions, 1 deletions
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