summaryrefslogtreecommitdiff
path: root/src/tool_urlglob.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2013-09-06 14:12:44 +0200
committerDaniel Stenberg <daniel@haxx.se>2013-09-06 14:12:44 +0200
commit2a7f1425d98919b362fbe979a6428fa9aeebcd78 (patch)
tree9195e3080301697eeee0521c7dee29ccff4e1c69 /src/tool_urlglob.c
parent900ccc26ae2eda8b56f69775b59678734a1c4f99 (diff)
downloadcurl-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.c2
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