Skip to content

Commit

Permalink
Merge pull request #7 from wongsyrone/fix-parsing
Browse files Browse the repository at this point in the history
Fix '-b' option parsing
  • Loading branch information
Andy2244 authored May 5, 2020
2 parents 2614566 + 4d05c81 commit 671d040
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions wsd.c
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,14 @@ int set_getresp(const char *str, const char **next)
const char *p, *val;
size_t keylen, vallen;

if (str == NULL) {
return -1;
}

if (*str == '\0') {
return -1;
}

/* Trim leading space. */
while (*str && isspace(*str))
str++;
Expand Down

0 comments on commit 671d040

Please sign in to comment.