1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-23 06:50:21 +03:00

s4-libregistry: Make sure we don't dereference a NULL pointer.

Reviewed-by: David Disseldorp <ddiss@samba.org>
This commit is contained in:
Andreas Schneider 2013-02-25 15:01:18 +01:00 committed by David Disseldorp
parent 1e4f4f6d92
commit 2aca90b9a0

View File

@ -163,7 +163,9 @@ static DATA_BLOB hbin_alloc(struct regf_data *data, uint32_t size,
struct hbin_block *hbin = NULL;
unsigned int i;
*offset = 0;
if (offset != NULL) {
*offset = 0;
}
if (size == 0)
return data_blob(NULL, 0);