Possible NULL-pointer dereference in lib/util/charset/pull_push.c

Torsten Kurbad samba-technical at tk-webart.de
Tue Aug 27 09:15:20 MDT 2013


Hi all,

while trying to build a product on top of the samba Python modules, a
segmentation fault occured, whenever I tried to open a SamDB connection
to our PDC via ldb's ldap backend.

Using valgrind, I tracked that down to a NULL-pointer dereference
occuring in lib/util/charset/pull_push.c, line 41 (Samba 4.0.8 code
base).

I somewhat circumvented the segfault by applying the attached patch.
However, I'm confident that there's a better way to deal with that,
i.e. preventing the occurence of NULL as the value of src right from
the start.

Can someone assist me with this, since I'm quite lost, when it comes to
C. ;-)

Thanks in advance,
Torsten
-------------- next part --------------
A non-text attachment was scrubbed...
Name: samba-4.0.8-pull_push.patch
Type: text/x-patch
Size: 397 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20130827/e2efbcdc/attachment.bin>


More information about the samba-technical mailing list