diff options
author | Yang Tse <yangsita@gmail.com> | 2011-10-05 19:33:46 +0200 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2011-10-05 19:33:46 +0200 |
commit | 0f19e0145aa0167167dc3c6b0e39d531325810d5 (patch) | |
tree | 6a424162d63626f66c62bf21f66f626c4d147901 | |
parent | ec73fd89ed5b526548e61527037e1603234333a0 (diff) |
curl tool: OOM handling fixes
-rw-r--r-- | src/tool_getparam.c | 3 |
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 |