]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
daemon/lldpd: handle case where PRETTY_NAME is empty
authorVincent Bernat <vincent@bernat.ch>
Sun, 26 Oct 2025 07:53:26 +0000 (08:53 +0100)
committerVincent Bernat <vincent@bernat.ch>
Sun, 26 Oct 2025 07:59:35 +0000 (08:59 +0100)
Fix #751

src/daemon/lldpd.c

index b5c87b5d22b49eda5ae48af123430f6eafc1c481..78dffee8d1c44502664c6a2b0ba4d7c65b75e218 100644 (file)
@@ -861,6 +861,7 @@ lldpd_get_os_release()
                if (key == NULL) continue;
 
                val = strtok(NULL, "=");
+               if (val == NULL) continue;
 
                if (strncmp(key, "PRETTY_NAME", sizeof(line)) == 0) {
                        strlcpy(release, val, sizeof(line));