mirror of
https://github.com/samba-team/samba.git
synced 2025-02-04 17:47:26 +03:00
99b2fd4f5b
Previously if the message had 0 elements, Talloc would reallocate the projected array to NULL, fooling LDB into thinking that it failed to reallocate. This fix corrects LDB to be able to handle the case where the message has no attributes in common with the filter. Also the realloc call resized the array to the number of elements in the message, not the number of elements in common with the filter -- it essentially did nothing. Unlike talloc_realloc, talloc_array always returns a non-null pointer. This would help protect against possible errors. Signed-off-by: Adrian Cochrane <adrianc@catalyst.net.nz> Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>