summaryrefslogtreecommitdiffstats
path: root/contrib/ntp/lib/isc/buffer.c
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2016-01-08 15:53:48 +0000
committerdelphij <delphij@FreeBSD.org>2016-01-08 15:53:48 +0000
commit31ece5769d393d00720a55b05dd7b3e85c2fcc52 (patch)
treeeb428181ad7f992dbbff39c2be903eaab7149cfb /contrib/ntp/lib/isc/buffer.c
parent72bd55ca76570ee190062912e8f0350831baca6f (diff)
parent8518518f8f222e4d58e27928a988f034b82bbb77 (diff)
downloadFreeBSD-src-31ece5769d393d00720a55b05dd7b3e85c2fcc52.zip
FreeBSD-src-31ece5769d393d00720a55b05dd7b3e85c2fcc52.tar.gz
MFV r293415:
ntp 4.2.8p5 Reviewed by: cy, roberto Relnotes: yes Differential Revision: https://reviews.freebsd.org/D4828
Diffstat (limited to 'contrib/ntp/lib/isc/buffer.c')
-rw-r--r--contrib/ntp/lib/isc/buffer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/ntp/lib/isc/buffer.c b/contrib/ntp/lib/isc/buffer.c
index 1b59e65..6a50985 100644
--- a/contrib/ntp/lib/isc/buffer.c
+++ b/contrib/ntp/lib/isc/buffer.c
@@ -406,7 +406,7 @@ isc__buffer_putmem(isc_buffer_t *b, const unsigned char *base,
void
isc__buffer_putstr(isc_buffer_t *b, const char *source) {
- unsigned int l;
+ size_t l;
unsigned char *cp;
REQUIRE(ISC_BUFFER_VALID(b));
@@ -421,7 +421,7 @@ isc__buffer_putstr(isc_buffer_t *b, const char *source) {
cp = isc_buffer_used(b);
memcpy(cp, source, l);
- b->used += l;
+ b->used += (u_int)l; /* checked above - no overflow here */
}
isc_result_t
OpenPOWER on IntegriCloud