2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 14:35:26 +00:00

don't do pointer arithmetic on null pointers

This commit is contained in:
Andreas Gustafsson
1999-10-30 01:35:18 +00:00
parent 1affefab31
commit 74da83876c

View File

@@ -392,7 +392,7 @@ isc_buffer_putmem(isc_buffer_t *b, unsigned char *base, unsigned int length)
REQUIRE(ISC_BUFFER_VALID(b)); REQUIRE(ISC_BUFFER_VALID(b));
REQUIRE(b->used + length <= b->length); REQUIRE(b->used + length <= b->length);
cp = b->base + b->used; cp = (unsigned char *)b->base + b->used;
memcpy(cp, base, length); memcpy(cp, base, length);
b->used += length; b->used += length;
} }