[PATCH] ldb: check result of talloc_get_type in ldb_search_default_callback

Pavel Reichl preichl at redhat.com
Wed May 13 05:50:47 MDT 2015


Hello,

while trying to find out memory leak using talloc_set_name() (which 
turned out not be a good idea at all) I got segfault from 
ldb_search_default_callback() caused by dereferencing NULL pointer (res).

I understand that returned value of talloc_get_type() is not checked for 
NULL often and now I'm also aware of problems connected to using 
talloc_set_name(). However, in my opinion segfault should not happen in 
any case.

Thank you for taking the time to consider attached patch.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-ldb-check-result-of-talloc_get_type-in-ldb_search_de.patch
Type: text/x-patch
Size: 902 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20150513/0409dad6/attachment.bin>


More information about the samba-technical mailing list