summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2013-02-25 15:01:18 +0100
committerDavid Disseldorp <ddiss@suse.de>2013-03-05 23:30:01 +0100
commit2aca90b9a00e0727d640c235ef71a9a8b0c5fdca (patch)
tree0e73e691a2e3a7aaaebdb992a2aaecef84d52195
parent1e4f4f6d921961c02398e51b97c6ff0c0bdf561d (diff)
downloadsamba-2aca90b9a00e0727d640c235ef71a9a8b0c5fdca.tar.gz
samba-2aca90b9a00e0727d640c235ef71a9a8b0c5fdca.tar.bz2
samba-2aca90b9a00e0727d640c235ef71a9a8b0c5fdca.zip
s4-libregistry: Make sure we don't dereference a NULL pointer.
Reviewed-by: David Disseldorp <ddiss@samba.org>
-rw-r--r--source4/lib/registry/regf.c4
1 files changed, 3 insertions, 1 deletions
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);