Commit e9f30fc2 authored by Ondřej Surý's avatar Ondřej Surý
Browse files

lib/isc/buffer.c: Fix invalid order of DbC checks that could cause dereference before NULL check

parent 8f2ad12d
......@@ -550,10 +550,11 @@ isc_buffer_allocate(isc_mem_t *mctx, isc_buffer_t **dynbuffer,
bdata = isc_mem_get(mctx, length);
isc_buffer_init(dbuf, bdata, length);
dbuf->mctx = mctx;
ENSURE(ISC_BUFFER_VALID(dbuf));
dbuf->mctx = mctx;
*dynbuffer = dbuf;
return (ISC_R_SUCCESS);
......
Markdown is supported
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