nwrap: Account for ending NULL pointer when checking the buffer length
authorSamuel Cabrero <scabrero@suse.de>
Wed, 18 Mar 2020 12:43:23 +0000 (13:43 +0100)
committerAndreas Schneider <asn@samba.org>
Thu, 19 Mar 2020 09:03:10 +0000 (10:03 +0100)
commit14e90a84f6e2566a87e641821802428b355b1b62
tree49ddbafe738979950bb18da419426a2506ef82a1
parent0d0c0188616cb0772c4cd2eb1b4da8a39171a3fa
nwrap: Account for ending NULL pointer when checking the buffer length

The hostent->h_addr_list ends with a NULL pointer, take it into account
when checking the provided buffer length.

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