diff options
author | Daniel Stenberg <daniel@haxx.se> | 2013-09-06 14:12:44 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2013-09-06 14:12:44 +0200 |
commit | 2a7f1425d98919b362fbe979a6428fa9aeebcd78 (patch) | |
tree | 9195e3080301697eeee0521c7dee29ccff4e1c69 /src/tool_urlglob.c | |
parent | 900ccc26ae2eda8b56f69775b59678734a1c4f99 (diff) | |
download | curl-2a7f1425d98919b362fbe979a6428fa9aeebcd78.tar.gz |
urlglob: avoid NULL pointer dereference
Thanks to clang-analyzer
Diffstat (limited to 'src/tool_urlglob.c')
-rw-r--r-- | src/tool_urlglob.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tool_urlglob.c b/src/tool_urlglob.c index 1644077f2..7c7bd4b35 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 |