[curl/curl] 5cf0ae: hostip: fix 3 coverity complaints
Daniel Stenberg <[email protected]> Tue, 01 Jun 2021 05:26:41 -0700
| Newsgroups | gmane.comp.web.curl.cvs |
|---|---|
| Message-ID | <curl/curl/push/refs/heads/bagder/localhost-nits/[email protected]> |
Branch: refs/heads/bagder/localhost-nits
Home: https://github.com/curl/curl
Commit: 5cf0ae3ba14ce0a3bf10267d07b6d0d61757776a
https://github.com/curl/curl/commit/5cf0ae3ba14ce0a3bf10267d07b6d0d61757776a
Author: Daniel Stenberg <[email protected]>
Date: 2021-06-01 (Tue, 01 Jun 2021)
Changed paths:
M lib/hostip.c
Log Message:
-----------
hostip: fix 3 coverity complaints
Follow-up to 1a0ebf6632f889eed
- Check the return code to Curl_inet_pton() in two instances, even
though we know the input is valid so the functions won't fail.
- Clear the 'struct sockaddr_in' struct before use so that the
'sin_zero' field isn't left uninitialized.
Detected by Coverity.
_______________________________________________
curl-commits mailing list
[email protected]
https://cool.haxx.se/cgi-bin/mailman/listinfo/curl-commits