gentoo-ebuilds/net-misc/ntp/files/ntp-4.2.8_p18-r2-bind-fail-NULL-dereference.patch
Jaco Kroon 55b5e9ea73
net-misc/ntp: 4.2.8_p18-r2
Closes: https://bugs.gentoo.org/962770
Closes: https://bugs.gentoo.org/963491
Signed-off-by: Jaco Kroon <jkroon@gentoo.org>
2025-11-01 19:41:23 +02:00

20 lines
509 B
Diff

Patch supplied by Nick Bowler on https://bugs.gentoo.org/962770
This avoids a NULL dereference in case ntp fails to bind() to a decided upon
address that should be bound.
--- ntp-4.2.8p18/ntpd/ntp_io.c.orig
+++ ntp-4.2.8p18/ntpd/ntp_io.c
@@ -1921,11 +1921,11 @@
}
else {
DPRINT_INTERFACE(3,
- (ep, "updating ", " new - FAILED"));
+ (ep2, "updating ", " new - FAILED"));
msyslog(LOG_ERR,
"cannot bind address %s",
- stoa(&ep->sin));
+ stoa(&ep2->sin));
}
free(ep2);
}