summaryrefslogtreecommitdiff
path: root/lib/isc/buffer.c
diff options
context:
space:
mode:
authorXin LI <delphij@FreeBSD.org>2016-01-08 08:06:14 +0000
committerXin LI <delphij@FreeBSD.org>2016-01-08 08:06:14 +0000
commitc373d9289d1987abe45e339b5aa37f05460e977f (patch)
treeeacecf05ade498902c426d07b76ce3d5e1306ffe /lib/isc/buffer.c
parent49b7d963372f963c2eab9435fa69aa1f61326111 (diff)
Notes
Diffstat (limited to 'lib/isc/buffer.c')
-rw-r--r--lib/isc/buffer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/isc/buffer.c b/lib/isc/buffer.c
index 1b59e650acdec..6a50985c74abc 100644
--- a/lib/isc/buffer.c
+++ b/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