s3:registry: add safety check for return value of tdb_unpack to regdb_fetch_keys_inte...
commit48cf79b1f791ed6918f83dca50df6807478346e0
authorMichael Adam <obnox@samba.org>
Mon, 2 Nov 2009 23:47:37 +0000 (3 00:47 +0100)
committerKarolin Seeger <kseeger@samba.org>
Thu, 26 Nov 2009 10:40:36 +0000 (26 11:40 +0100)
tree40c435f73fa748b176c0db958666fae26307eea6
parent64ce63f5dc83c8b3f8f009880748dbb5ae169e79
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

Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit 3fb7db84d76f15cc218554559c0f498cf00d1f7c)
source3/registry/reg_backend_db.c