s3:registry: add safety check for return value of tdb_unpack to regdb_fetch_keys_inte...
commitf6f2151a3947cc105481c64a31d2405f239948cc
authorMichael Adam <obnox@samba.org>
Mon, 2 Nov 2009 23:47:37 +0000 (3 00:47 +0100)
committerMichael Adam <obnox@samba.org>
Tue, 3 Nov 2009 00:02:38 +0000 (3 01:02 +0100)
treed3ff2c3d72e2d4aaf2f3e98187699b1f04abe5c0
parent25bdf27eaa634f9e54e6252397942beb46f07db5
s3:registry: add safety check for return value of tdb_unpack to regdb_fetch_keys_internal()

Prevents segfaults in some situations.

(For a non existent or empty record, we sometimes rely on the fetch operation
 to return dsize==0 and sometimes we rely on dptr==NULL.)

Michael
source3/registry/reg_backend_db.c