From 2aca90b9a00e0727d640c235ef71a9a8b0c5fdca Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Mon, 25 Feb 2013 15:01:18 +0100 Subject: s4-libregistry: Make sure we don't dereference a NULL pointer. Reviewed-by: David Disseldorp --- source4/lib/registry/regf.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source4/lib') diff --git a/source4/lib/registry/regf.c b/source4/lib/registry/regf.c index b6a586cf78..06476b940e 100644 --- a/source4/lib/registry/regf.c +++ b/source4/lib/registry/regf.c @@ -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); -- cgit