From: Frank Kardel Date: Sat, 18 Mar 2006 07:55:03 +0000 (+0000) Subject: ntptime.c: X-Git-Tag: NTP_4_2_1P10_RC~24 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=42371ac03ba3a1d55512a190009902168dcd7841;p=thirdparty%2Fntp.git ntptime.c: resolve bounds issue (Coverity CID 1466, NetBSD scan) bk: 441bbcd7-JjrPkHsqhGvC_KLj-yipw --- diff --git a/util/ntptime.c b/util/ntptime.c index 51111bea6..38ed45840 100644 --- a/util/ntptime.c +++ b/util/ntptime.c @@ -433,7 +433,7 @@ timex_state( { static char buf[32]; - if (s >= 0 && s <= sizeof(timex_states) / sizeof(timex_states[0])) + if (s >= 0 && s < sizeof(timex_states) / sizeof(timex_states[0])) return (timex_states[s]); sprintf(buf, "TIME-#%d", s); return (buf);