]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
ntptime.c:
authorFrank Kardel <kardel@ntp.org>
Sat, 18 Mar 2006 07:55:03 +0000 (07:55 +0000)
committerFrank Kardel <kardel@ntp.org>
Sat, 18 Mar 2006 07:55:03 +0000 (07:55 +0000)
  resolve bounds issue (Coverity CID 1466, NetBSD scan)

bk: 441bbcd7-JjrPkHsqhGvC_KLj-yipw

util/ntptime.c

index 51111bea681042d1612131e59b67704a9bf9139d..38ed4584053506db81c335f3a426ca43feccd119 100644 (file)
@@ -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);