mirror of
https://github.com/curl/curl.git
synced 2024-11-21 01:16:58 +08:00
Curl_getaddrinfo_ex: sanitize function results follow-up.
This commit is contained in:
parent
6fe18add71
commit
1d75d30816
@ -208,6 +208,18 @@ Curl_getaddrinfo_ex(const char *nodename,
|
||||
Curl_freeaddrinfo(cafirst);
|
||||
cafirst = NULL;
|
||||
}
|
||||
else if(!cafirst) {
|
||||
#ifdef EAI_NONAME
|
||||
/* rfc3493 conformant */
|
||||
error = EAI_NONAME;
|
||||
#else
|
||||
/* rfc3493 obsoleted */
|
||||
error = EAI_NODATA;
|
||||
#endif
|
||||
#ifdef USE_WINSOCK
|
||||
SET_SOCKERRNO(error);
|
||||
#endif
|
||||
}
|
||||
|
||||
*result = cafirst;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user