[Git][NTPsec/ntpsec][master] Suppress Coverity 497295 (Bug in Coverity)

Hal Murray (@hal.murray) gitlab at mg.gitlab.com
Tue Jan 21 01:09:03 UTC 2025



Hal Murray pushed to branch master at NTPsec / ntpsec


Commits:
0ac07c37 by Hal Murray at 2025-01-20T17:07:11-08:00
Suppress Coverity 497295 (Bug in Coverity)

- - - - -


1 changed file:

- ntpd/ntp_refclock.c


Changes:

=====================================
ntpd/ntp_refclock.c
=====================================
@@ -470,6 +470,8 @@ refclock_sample(
 	 */
 	i = 0; j = n;
 	m = n - ((n*4)/10);
+	/* coverity[INTEGER_OVERFLOW] CID 497295, 
+	 * Bug in Coverity: goes around loop when it shouldn't */
 	while ((j - i) > m) {
 		offset = off[(j + i) / 2];
 		if (off[j - 1] - offset < offset - off[i])



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/commit/0ac07c37dede1bc1a0277c8ad1e45ceb1da90c21

-- 
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/commit/0ac07c37dede1bc1a0277c8ad1e45ceb1da90c21
You're receiving this email because of your account on gitlab.com.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20250121/347fa5d6/attachment.htm>


More information about the vc mailing list