Skip to content

Commit 117742d

Browse files
authored
options: Ensure ldop is not NULL dereferenced (#568)
ldop itself cannot be non NULL as it points to the location. but *ldop CAN be NULL. Fixes #567.
1 parent 2de751b commit 117742d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/if-options.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1882,7 +1882,7 @@ parse_option(struct dhcpcd_ctx *ctx, const char *ifname, struct if_options *ifo,
18821882
if (*edop) {
18831883
dop = &(*edop)->embopts;
18841884
dop_len = &(*edop)->embopts_len;
1885-
} else if (ldop) {
1885+
} else if (*ldop) {
18861886
dop = &(*ldop)->embopts;
18871887
dop_len = &(*ldop)->embopts_len;
18881888
} else {

0 commit comments

Comments
 (0)