chiark / gitweb /
libsystemd-network: Avoid potential NULL dereference in test-lldp
authorPhilippe De Swert <philippedeswert@gmail.com>
Sun, 8 Feb 2015 20:21:51 +0000 (22:21 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 10 Feb 2015 20:11:52 +0000 (21:11 +0100)
As a malloc0 could fail, doing a strncpy without checking could
cause issues. Adding an assert should be good enough and in line
with other similar routines in the code.

Found with Coverity Fixes: CID#1261402


No differences found