]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
options: Ensure ldop is not NULL dereferenced (#568) master
authorRoy Marples <roy@marples.name>
Sun, 21 Dec 2025 08:31:52 +0000 (08:31 +0000)
committerGitHub <noreply@github.com>
Sun, 21 Dec 2025 08:31:52 +0000 (08:31 +0000)
ldop itself cannot be non NULL as it points to the location.
but *ldop CAN be NULL.

Fixes #567.

src/if-options.c

index 083449b97d38c3241809220e2858988d1ce5b345..9ac9f0b8f3f309424c9b9c539393469a45416929 100644 (file)
@@ -1882,7 +1882,7 @@ err_sla:
                        if (*edop) {
                                dop = &(*edop)->embopts;
                                dop_len = &(*edop)->embopts_len;
-                       } else if (ldop) {
+                       } else if (*ldop) {
                                dop = &(*ldop)->embopts;
                                dop_len = &(*ldop)->embopts_len;
                        } else {