urlglob: avoid NULL pointer dereference

Thanks to clang-analyzer
This commit is contained in:
Daniel Stenberg 2013-09-06 14:12:44 +02:00
parent 900ccc26ae
commit 2a7f1425d9
1 changed files with 1 additions and 1 deletions

View File

@ -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