s4:dsdb use talloc_strndup() in GET_STRING_LDB() rather than walk off the end
authorAndrew Bartlett <abartlet@samba.org>
Mon, 24 Aug 2009 03:09:10 +0000 (13:09 +1000)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 24 Aug 2009 10:24:18 +0000 (20:24 +1000)
commitcc330f93625290dc5f67c9c0f2f17e566ddbf1f1
treef8b5db92a9e87597de7fbf24368db509b995fe02
parent0f98d539e2edc8f1d57271fb20051189699222a7
s4:dsdb use talloc_strndup() in GET_STRING_LDB() rather than walk off the end

The problem is that samdb_result_string() and
ldb_msg_find_attr_as_string() both simply cast the string, rather than
ensuring the return value is NULL terminated.  This may be best
regarded as a flaw in LDB, but fixing it there is going to be more
difficult.

Andrew Bartlett
source4/dsdb/schema/schema_init.c