[PATCH] fix for ldb_msg_add_string() to increase value lifetime

Tim Potter tpot at samba.org
Mon Sep 3 11:35:29 GMT 2007


Hey ldb people - I would like to propose this patch to take a copy of
the string value when calling ldb_msg_add_string().  It's actually
pretty easy to find garbage in your attribute values if the lifetime of
the const char *str parameter is less than the lifetime of the
ldb_message.

Comments?  It looks OK to me.  (-:


Tim.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ldb_msg_string.patch
Type: text/x-patch
Size: 437 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20070903/82a8b84c/ldb_msg_string.bin


More information about the samba-technical mailing list