summaryrefslogtreecommitdiffstats
path: root/contrib/ntp/lib/isc/buffer.c
diff options
context:
space:
mode:
authorglebius <glebius@FreeBSD.org>2016-01-11 01:09:50 +0000
committerglebius <glebius@FreeBSD.org>2016-01-11 01:09:50 +0000
commitc41fbaf9bc76f0b7650e448fbd88d0a9815f47fd (patch)
tree3b45c8e63a37b132f0fe10c570b8302052c547de /contrib/ntp/lib/isc/buffer.c
parent3066f138bc3bf99f5cf6ec9412903d206c329cc7 (diff)
downloadFreeBSD-src-c41fbaf9bc76f0b7650e448fbd88d0a9815f47fd.zip
FreeBSD-src-c41fbaf9bc76f0b7650e448fbd88d0a9815f47fd.tar.gz
Merge r293423, r293469:
ntp 4.2.8p5 Relnotes: yes
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