diff options
Diffstat (limited to 'lib/isccc/base64.c')
-rw-r--r-- | lib/isccc/base64.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/isccc/base64.c b/lib/isccc/base64.c index 78b34edf4f921..bf8487e2d6bab 100644 --- a/lib/isccc/base64.c +++ b/lib/isccc/base64.c @@ -1,5 +1,5 @@ /* - * Portions Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC") + * Portions Copyright (C) 2004, 2005, 2007, 2013 Internet Systems Consortium, Inc. ("ISC") * Portions Copyright (C) 2001 Internet Software Consortium. * * Permission to use, copy, modify, and/or distribute this software for any @@ -53,8 +53,9 @@ isccc_base64_encode(isccc_region_t *source, int wordlength, isc_result_t result; sr.base = source->rstart; - sr.length = source->rend - source->rstart; - isc_buffer_init(&tb, target->rstart, target->rend - target->rstart); + sr.length = (unsigned int)(source->rend - source->rstart); + isc_buffer_init(&tb, target->rstart, + (unsigned int)(target->rend - target->rstart)); result = isc_base64_totext(&sr, wordlength, wordbreak, &tb); if (result != ISC_R_SUCCESS) @@ -69,7 +70,8 @@ isccc_base64_decode(const char *cstr, isccc_region_t *target) { isc_buffer_t b; isc_result_t result; - isc_buffer_init(&b, target->rstart, target->rend - target->rstart); + isc_buffer_init(&b, target->rstart, + (unsigned int)(target->rend - target->rstart)); result = isc_base64_decodestring(cstr, &b); if (result != ISC_R_SUCCESS) return (result); |