From ae20201494f44cb98e58ba98531a79feeeb82b47 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 28 Aug 2006 05:35:27 +0000 Subject: [PATCH] r17878: Fix possible null deref found by Stanford checker. Jeremy. --- source/registry/reg_objects.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/registry/reg_objects.c b/source/registry/reg_objects.c index 1bd3ac9bd91..83fd85658fb 100644 --- a/source/registry/reg_objects.c +++ b/source/registry/reg_objects.c @@ -109,6 +109,10 @@ BOOL regsubkey_ctr_key_exists( REGSUBKEY_CTR *ctr, const char *keyname ) { int i; + if (!ctr->subkeys) { + return False; + } + for ( i=0; inum_subkeys; i++ ) { if ( strequal( ctr->subkeys[i],keyname ) ) return True;