Commit f8d63d12 authored by Bob Halley's avatar Bob Halley
Browse files

Cast to (unsigned char *) in isc_buffer_putstr() because pointer arithmetic

on (void *) is not well defined.
parent f39add73
......@@ -400,7 +400,7 @@ isc_buffer_putmem(isc_buffer_t *b, unsigned char *base, unsigned int length)
isc_buffer_putstr(isc_buffer_t *b, const char *source) {
unsigned int l;
isc_region_t region;
unsigned char *cp;
REQUIRE(source != NULL);
......@@ -409,8 +409,10 @@ isc_buffer_putstr(isc_buffer_t *b, const char *source) {
if (l > (b->length - b->used))
return (ISC_R_NOSPACE);
memcpy(b->base + b->used, source, l);
cp = (unsigned char *)b->base + b->used;
memcpy(cp, source, l);
b->used += l;
return (ISC_R_SUCCESS);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment