From 74da83876c49f1c05d6f84c5257d88573a4e637b Mon Sep 17 00:00:00 2001 From: Andreas Gustafsson Date: Sat, 30 Oct 1999 01:35:18 +0000 Subject: [PATCH] don't do pointer arithmetic on null pointers --- lib/isc/buffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/isc/buffer.c b/lib/isc/buffer.c index df94c75055..dc272b047e 100644 --- a/lib/isc/buffer.c +++ b/lib/isc/buffer.c @@ -392,7 +392,7 @@ isc_buffer_putmem(isc_buffer_t *b, unsigned char *base, unsigned int length) REQUIRE(ISC_BUFFER_VALID(b)); REQUIRE(b->used + length <= b->length); - cp = b->base + b->used; + cp = (unsigned char *)b->base + b->used; memcpy(cp, base, length); b->used += length; }