Skip to content

Commit 671d040

Browse files
authored
Merge pull request #7 from wongsyrone/fix-parsing
Fix '-b' option parsing
2 parents 2614566 + 4d05c81 commit 671d040

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

wsd.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,14 @@ int set_getresp(const char *str, const char **next)
194194
const char *p, *val;
195195
size_t keylen, vallen;
196196

197+
if (str == NULL) {
198+
return -1;
199+
}
200+
201+
if (*str == '\0') {
202+
return -1;
203+
}
204+
197205
/* Trim leading space. */
198206
while (*str && isspace(*str))
199207
str++;

0 commit comments

Comments
 (0)