1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-21 23:58:49 -05:00

Curl_getaddrinfo_ex: sanitize function results follow-up.

This commit is contained in:
Yang Tse 2010-11-24 04:36:57 +01:00
parent 6fe18add71
commit 1d75d30816

View File

@ -208,6 +208,18 @@ Curl_getaddrinfo_ex(const char *nodename,
Curl_freeaddrinfo(cafirst); Curl_freeaddrinfo(cafirst);
cafirst = NULL; 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; *result = cafirst;