Skip to content

Commit 220f68c

Browse files
committed
Adjust prior to stop another potential NULL deref
1 parent 844c377 commit 220f68c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/if-options.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -944,10 +944,11 @@ parse_option(struct dhcpcd_ctx *ctx, const char *ifname, struct if_options *ifo,
944944
return -1;
945945
}
946946

947-
if (fp != NULL) {
947+
if (fp != NULL)
948948
fp = strskipwhite(fp);
949+
if (fp != NULL)
949950
p = strchr(fp, ',');
950-
} else
951+
else
951952
p = NULL;
952953
if (p == NULL || p[1] == '\0') {
953954
logerrx("invalid vendor format: %s", arg);

0 commit comments

Comments
 (0)