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:
@@ -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;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user