git: 859aa726fb86 - stable/14 - ntp: NULL pointer deref when create_interface() fails
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 28 Feb 2025 15:59:06 UTC
The branch stable/14 has been updated by cy:
URL: https://cgit.FreeBSD.org/src/commit/?id=859aa726fb8642d8f329c7a34c51356c4eaeae88
commit 859aa726fb8642d8f329c7a34c51356c4eaeae88
Author: Cy Schubert <cy@FreeBSD.org>
AuthorDate: 2025-02-28 15:46:23 +0000
Commit: Cy Schubert <cy@FreeBSD.org>
CommitDate: 2025-02-28 15:59:00 +0000
ntp: NULL pointer deref when create_interface() fails
Fix NULL pointer dereference when create_interface() fails in
update_interfaces(). The upstream bug report says a typo was introduced
by https://bk.ntp.org/ntp-dev/ntpd/ntp_io.c?PAGE=diffs&REV=66175036PETA6g__fON8oNrjL54Ttw. ep should have been ep2.
Fix obtained from upstream bug report.
PR: 285065
Upstream bug: https://bugs.ntp.org/show_bug.cgi?id=3939
(cherry picked from commit 628715fdcc9f2226bfe0f4ebe381aaa7761cb6cc)
---
contrib/ntp/ntpd/ntp_io.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/contrib/ntp/ntpd/ntp_io.c b/contrib/ntp/ntpd/ntp_io.c
index 9d79fe493d9b..12a61ccb1d2c 100644
--- a/contrib/ntp/ntpd/ntp_io.c
+++ b/contrib/ntp/ntpd/ntp_io.c
@@ -1921,7 +1921,7 @@ update_interfaces(
}
else {
DPRINT_INTERFACE(3,
- (ep, "updating ", " new - FAILED"));
+ (ep2, "updating ", " new - FAILED"));
msyslog(LOG_ERR,
"cannot bind address %s",