From: Yu Watanabe Date: Mon, 4 Sep 2023 07:51:25 +0000 (+0900) Subject: sd-ndisc,sd-radv: fix use of uninitialized value X-Git-Tag: v255-rc1~591^2~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4674f407b2a96baaed4c8226342bccb313463717;p=thirdparty%2Fsystemd.git sd-ndisc,sd-radv: fix use of uninitialized value When icmp6_receive() fails, then the source address is not initialized yet. --- diff --git a/src/libsystemd-network/sd-ndisc.c b/src/libsystemd-network/sd-ndisc.c index ca5365b95ff..8a6760188d1 100644 --- a/src/libsystemd-network/sd-ndisc.c +++ b/src/libsystemd-network/sd-ndisc.c @@ -225,8 +225,7 @@ static int ndisc_recv(sd_event_source *s, int fd, uint32_t revents, void *userda if (r < 0) switch (r) { case -EADDRNOTAVAIL: - log_ndisc(nd, "Received RA from non-link-local address %s. Ignoring.", - IN6_ADDR_TO_STRING(&rt->address)); + log_ndisc(nd, "Received RA from non-link-local address. Ignoring."); return 0; case -EMULTIHOP: diff --git a/src/libsystemd-network/sd-radv.c b/src/libsystemd-network/sd-radv.c index cb7bc07f5af..afb0fd95b66 100644 --- a/src/libsystemd-network/sd-radv.c +++ b/src/libsystemd-network/sd-radv.c @@ -264,8 +264,7 @@ static int radv_recv(sd_event_source *s, int fd, uint32_t revents, void *userdat if (r < 0) switch (r) { case -EADDRNOTAVAIL: - log_radv(ra, "Received RS from non-link-local address %s. Ignoring", - IN6_ADDR_TO_STRING(&src)); + log_radv(ra, "Received RS from non-link-local address. Ignoring"); return 0; case -EMULTIHOP: