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

Stefan (metze) Metzmacher metze at samba.org
Mon Sep 3 11:52:14 GMT 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Tim Potter schrieb:
> 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.  (-:
Hi Tim,

please return an error if talloc_strdup() fails.

metze
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFG2/Vtm70gjA5TCD8RAnEqAJ4izL1Czo6e3mIcIZxjGWt09L8xCQCfT6b8
s8MzaoSxpCgZShV1uiNltGc=
=zQdL
-----END PGP SIGNATURE-----


More information about the samba-technical mailing list