From: Daniel Stenberg Date: Fri, 6 Sep 2013 12:12:44 +0000 (+0200) Subject: urlglob: avoid NULL pointer dereference X-Git-Tag: curl-7_33_0~156 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2a7f1425d98919b362fbe979a6428fa9aeebcd78;p=thirdparty%2Fcurl.git urlglob: avoid NULL pointer dereference Thanks to clang-analyzer --- diff --git a/src/tool_urlglob.c b/src/tool_urlglob.c index 1644077f28..7c7bd4b359 100644 --- a/src/tool_urlglob.c +++ b/src/tool_urlglob.c @@ -287,7 +287,7 @@ static GlobCode glob_range(URLGlob *glob, char **patternp, } else step_n = 1; - if(*endp == ']') { + if(endp && (*endp == ']')) { pattern= endp+1; } else