diff options
Diffstat (limited to 'lib/isc/base64.c')
-rw-r--r-- | lib/isc/base64.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/isc/base64.c b/lib/isc/base64.c index bad1565bea7b..6b4cb1bf7c63 100644 --- a/lib/isc/base64.c +++ b/lib/isc/base64.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004, 2005, 2007, 2009 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004, 2005, 2007, 2009, 2013, 2014 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1998-2001, 2003 Internet Software Consortium. * * Permission to use, copy, modify, and/or distribute this software for any @@ -124,7 +124,7 @@ base64_decode_char(base64_decode_ctx_t *ctx, int c) { return (ISC_R_BADBASE64); if ((s = strchr(base64, c)) == NULL) return (ISC_R_BADBASE64); - ctx->val[ctx->digits++] = s - base64; + ctx->val[ctx->digits++] = (int)(s - base64); if (ctx->digits == 4) { int n; unsigned char buf[3]; @@ -234,7 +234,7 @@ str_totext(const char *source, isc_buffer_t *target) { if (l > region.length) return (ISC_R_NOSPACE); - memcpy(region.base, source, l); + memmove(region.base, source, l); isc_buffer_add(target, l); return (ISC_R_SUCCESS); } @@ -246,7 +246,7 @@ mem_tobuffer(isc_buffer_t *target, void *base, unsigned int length) { isc_buffer_availableregion(target, &tr); if (length > tr.length) return (ISC_R_NOSPACE); - memcpy(tr.base, base, length); + memmove(tr.base, base, length); isc_buffer_add(target, length); return (ISC_R_SUCCESS); } |