nwrap: Zero the result in case we return with an error
authorAndreas Schneider <asn@samba.org>
Thu, 19 Mar 2020 08:45:09 +0000 (09:45 +0100)
committerAndreas Schneider <asn@samba.org>
Thu, 19 Mar 2020 08:49:39 +0000 (09:49 +0100)
commit0f30d319d5200f36d53014c42d1a45468ab4041c
tree77f362af7349dfa1e36895576ec39ae402f50df2
parent36c51922f16d8e0c4308b7372799d2f83937b76b
nwrap: Zero the result in case we return with an error

This fixes a crash bug in OpenLDAP libraries which do not check the
return value of gethostbyname_r().

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Reviewed-by: Samuel Cabrero <scabrero@suse.de>
src/nss_wrapper.c