vincentbernat/lldpd — Issue #11: Null pointer access when lldpd is started with -k
Author: bhjortsberg
Created: 2011-11-02 14:15:22+00:00
State: open

If the following code fails:

lsb_release = lldpd_get_os_release();
if (!lsb_release) {
lsb_release = lldpd_get_lsb_release();
}

then there is a null pointer access if lldpd is started with -k (advertise_version==0).
Fixed it by changing:
if (!(cfg->g_advertise_version = advertise_version))
into
if (lsb_release && !(cfg->g_advertise_version = advertise_version))