[Git][NTPsec/ntpsec][master] Attempt more supprression of trivial Coverity warnings.

Eric S. Raymond gitlab at mg.gitlab.com
Tue Sep 1 21:12:17 UTC 2020



Eric S. Raymond pushed to branch master at NTPsec / ntpsec


Commits:
8d2a6ad3 by Eric S. Raymond at 2020-09-01T17:12:56-04:00
Attempt more supprression of trivial Coverity warnings.

- - - - -


3 changed files:

- attic/random.c
- attic/sht.c
- ntpd/ntp_control.c


Changes:

=====================================
attic/random.c
=====================================
@@ -151,6 +151,7 @@ static int do_fastest(void) {
 
 	for (int i = 0; i < BATCHSIZE; i++) {
                 clock_gettime(CLOCK_REALTIME, &start);
+		/* coverity[weak_crypto] */
 		sum += random();
 		clock_gettime(CLOCK_REALTIME, &stop);
 		sec = (stop.tv_sec-start.tv_sec);


=====================================
attic/sht.c
=====================================
@@ -163,6 +163,7 @@ again:
 		else
 		{
 			time(&rcv_sec);
+			/* coverity[dc.weak_crypto] */
 			rcv_frc = (unsigned int)random() % 1000000000U;
 		}
 		/* add a wobble of ~3.5msec to the clock time */


=====================================
ntpd/ntp_control.c
=====================================
@@ -830,8 +830,8 @@ process_control(
 	 */
 	reqpt = (char *)pkt->data;
 	if (CTL_MAX_DATA_LEN < req_count) {
-                /* count too big */
-		/* coverity[deadcode] backstop to prevent stack overflow */
+                /* count too big - backstop to prevent stack overflow*/
+		/* coverity[deadcode] */
 		ctl_error(CERR_BADFMT);
 		numctlbadpkts++;
 		return;



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/commit/8d2a6ad32db446ff2a7a0d5c928305c9b235c818

-- 
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/commit/8d2a6ad32db446ff2a7a0d5c928305c9b235c818
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/20200901/0aec543a/attachment-0001.htm>


More information about the vc mailing list