[ntpsec-main commit] Coverity warning suppression. At zero warnings following this change.
Eric S. Raymond
esr at ntpsec.org
Mon Nov 9 15:11:37 UTC 2015
Module: ntpsec-main
Branch: master
Commit: 49c558bd1d90b18a0bda644c8b81ab164dc9655a
Changeset: http://git.ntpsec.org//commit/?id=49c558bd1d90b18a0bda644c8b81ab164dc9655a
Author: Eric S. Raymond <esr at thyrsus.com>
Date: Mon Nov 9 10:10:35 2015 -0500
Coverity warning suppression. At zero warnings following this change.
---
ntpd/ntp_proto.c | 1 +
ntpd/refclock_parse.c | 6 +++---
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/ntpd/ntp_proto.c b/ntpd/ntp_proto.c
index ce40063..3f0ca6f 100644
--- a/ntpd/ntp_proto.c
+++ b/ntpd/ntp_proto.c
@@ -529,6 +529,7 @@ receive(
return; /* bad length */
}
if (has_mac <= (int)MAX_MAC_LEN) {
+ /* coverity[overrun-local] */
skeyid = ntohl(((uint32_t *)pkt)[authlen / 4]);
break;
diff --git a/ntpd/refclock_parse.c b/ntpd/refclock_parse.c
index d47a439..4237e50 100644
--- a/ntpd/refclock_parse.c
+++ b/ntpd/refclock_parse.c
@@ -3809,11 +3809,11 @@ gps16x_message(
}
s++;
}
- p = ap(buffer, sizeof(buffer), p, "\"");
+ ap(buffer, sizeof(buffer), p, "\"");
}
else
{
- p = ap(buffer, sizeof(buffer), p, "<all buffered data complete>\"");
+ ap(buffer, sizeof(buffer), p, "<all buffered data complete>\"");
}
set_var(&parse->kv, buffer, strlen(buffer)+1, RO|DEF);
@@ -3999,7 +3999,7 @@ gps16x_message(
if (tmp_val & 0x08) /* A-S is on, P-code is encrypted */
p = ap( buffer, sizeof(buffer), p, ", A-S on" );
- p = ap(buffer, sizeof(buffer), p, ")\"");
+ ap(buffer, sizeof(buffer), p, ")\"");
set_var(&parse->kv, buffer, sizeof(buffer), RO|COND_DEF);
}
}
More information about the vc
mailing list