From 2df6d81d8aa98a0b856c537ff9964f39663d8b2b Mon Sep 17 00:00:00 2001 From: jsg Date: Thu, 8 Feb 2024 00:15:53 +0000 Subject: [PATCH] correct size in ipv6 address comparison found by "'&a->sin6_addr' too small (16 vs 28)" smatch error ok jca@ --- usr.sbin/ntpd/ntp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/ntpd/ntp.c b/usr.sbin/ntpd/ntp.c index 6037c82ec57..a0984e94346 100644 --- a/usr.sbin/ntpd/ntp.c +++ b/usr.sbin/ntpd/ntp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ntp.c,v 1.172 2023/12/20 15:36:36 otto Exp $ */ +/* $OpenBSD: ntp.c,v 1.173 2024/02/08 00:15:53 jsg Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer @@ -534,7 +534,7 @@ inpool(struct sockaddr_storage *a, return 1; } else if (memcmp(&((struct sockaddr_in6 *)a)->sin6_addr, &((struct sockaddr_in6 *)&old[i])->sin6_addr, - sizeof(struct sockaddr_in6)) == 0) { + sizeof(struct in6_addr)) == 0) { return 1; } } -- 2.20.1