]> git.ipfire.org Git - thirdparty/lldpd.git/commit
Be more defensive when parsing PRETTY_NAME out of os-release
authorEnji Cooper <yaneurabeya@gmail.com>
Thu, 6 Jun 2024 04:25:59 +0000 (21:25 -0700)
committerVincent Bernat <vincent@bernat.ch>
Thu, 6 Jun 2024 06:53:16 +0000 (08:53 +0200)
commit2151a7d056a626132273aadfb7022547b076d010
treed136f01a21e6f76dea7137a458b748815ea3022d
parent9067c45d334c282d185d88c9580863316b1f4d50
Be more defensive when parsing PRETTY_NAME out of os-release

Test the result of `strtok(..)` to ensure that the line being parsed has
an `=` sign in it. This addresses a potential crash due to a NULL
pointer dereference.

Reported by: Coverity
Signed-off-by: Enji Cooper <yaneurabeya@gmail.com>
src/daemon/lldpd.c