summaryrefslogtreecommitdiff
path: root/lib/dns/gssapi_link.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/dns/gssapi_link.c')
-rw-r--r--lib/dns/gssapi_link.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/dns/gssapi_link.c b/lib/dns/gssapi_link.c
index a992a8953f20..f15598a7851e 100644
--- a/lib/dns/gssapi_link.c
+++ b/lib/dns/gssapi_link.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004-2009, 2011, 2012 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2009, 2011-2014 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000-2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -47,7 +47,7 @@
#define GBUFFER_TO_REGION(gb, r) \
do { \
- (r).length = (gb).length; \
+ (r).length = (unsigned int)(gb).length; \
(r).base = (gb).value; \
} while (0)
@@ -180,7 +180,7 @@ gssapi_sign(dst_context_t *dctx, isc_buffer_t *sig) {
* Copy the output into our buffer space, and release the gssapi
* allocated space.
*/
- isc_buffer_putmem(sig, gsig.value, gsig.length);
+ isc_buffer_putmem(sig, gsig.value, (unsigned int)gsig.length);
if (gsig.length != 0U)
gss_release_buffer(&minor, &gsig);
@@ -216,7 +216,7 @@ gssapi_verify(dst_context_t *dctx, const isc_region_t *sig) {
buf = isc_mem_allocate(dst__memory_pool, sig->length);
if (buf == NULL)
return (ISC_R_FAILURE);
- memcpy(buf, sig->base, sig->length);
+ memmove(buf, sig->base, sig->length);
r.base = buf;
r.length = sig->length;
REGION_TO_GBUFFER(r, gsig);
@@ -286,7 +286,7 @@ gssapi_destroy(dst_key_t *key) {
static isc_result_t
gssapi_restore(dst_key_t *key, const char *keystr) {
OM_uint32 major, minor;
- size_t len;
+ unsigned int len;
isc_buffer_t *b = NULL;
isc_region_t r;
gss_buffer_desc gssbuffer;
@@ -346,13 +346,13 @@ gssapi_dump(dst_key_t *key, isc_mem_t *mctx, char **buffer, int *length) {
gss_release_buffer(&minor, &gssbuffer);
return (ISC_R_NOMEMORY);
}
- isc_buffer_init(&b, buf, len);
+ isc_buffer_init(&b, buf, (unsigned int)len);
GBUFFER_TO_REGION(gssbuffer, r);
result = isc_base64_totext(&r, 0, "", &b);
RUNTIME_CHECK(result == ISC_R_SUCCESS);
gss_release_buffer(&minor, &gssbuffer);
*buffer = buf;
- *length = len;
+ *length = (int)len;
return (ISC_R_SUCCESS);
}