diff options
author | Jeremy Allison <jra@samba.org> | 2006-08-28 05:35:27 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:38:56 -0500 |
commit | 2eff779b1706d32dc4996197d18b7eb6576230df (patch) | |
tree | 43cd7e9793197ed34cb60387e5b8e491570a0b89 /source3/registry | |
parent | 4d6b8ac0872a98aedf0c799f90b2620377386516 (diff) | |
download | samba-2eff779b1706d32dc4996197d18b7eb6576230df.tar.gz samba-2eff779b1706d32dc4996197d18b7eb6576230df.tar.bz2 samba-2eff779b1706d32dc4996197d18b7eb6576230df.zip |
r17878: Fix possible null deref found by Stanford checker.
Jeremy.
(This used to be commit ae20201494f44cb98e58ba98531a79feeeb82b47)
Diffstat (limited to 'source3/registry')
-rw-r--r-- | source3/registry/reg_objects.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/registry/reg_objects.c b/source3/registry/reg_objects.c index 1bd3ac9bd9..83fd85658f 100644 --- a/source3/registry/reg_objects.c +++ b/source3/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; i<ctr->num_subkeys; i++ ) { if ( strequal( ctr->subkeys[i],keyname ) ) return True; |