diff options
author | Michael Adam <obnox@samba.org> | 2009-11-03 00:51:27 +0100 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2009-11-03 01:02:39 +0100 |
commit | cc5b22a0165a1c7d6a0839edd67b8107fc883464 (patch) | |
tree | 41bc5d3e3f053980604bda09fdfba2802bc6e5de /source3/registry | |
parent | f6f2151a3947cc105481c64a31d2405f239948cc (diff) | |
download | samba-cc5b22a0165a1c7d6a0839edd67b8107fc883464.tar.gz samba-cc5b22a0165a1c7d6a0839edd67b8107fc883464.tar.bz2 samba-cc5b22a0165a1c7d6a0839edd67b8107fc883464.zip |
s3:registry: add an extra check for dsize==0 to regdb_fetch_keys_internal()
Don't only rely on dptr == NULL.
I stumbled over this one when rewriting some of the dbwrap_ctdb code.
Michael
Diffstat (limited to 'source3/registry')
-rw-r--r-- | source3/registry/reg_backend_db.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/registry/reg_backend_db.c b/source3/registry/reg_backend_db.c index 2cd3593537..43963db3c2 100644 --- a/source3/registry/reg_backend_db.c +++ b/source3/registry/reg_backend_db.c @@ -1461,7 +1461,7 @@ static WERROR regdb_fetch_keys_internal(struct db_context *db, const char *key, value = regdb_fetch_key_internal(db, frame, key); - if (value.dptr == NULL) { + if (value.dsize == 0 || value.dptr == NULL) { DEBUG(10, ("regdb_fetch_keys: no subkeys found for key [%s]\n", key)); goto done; |