mirror of
https://github.com/moparisthebest/curl
synced 2024-12-22 08:08:50 -05:00
Alfredo Tupone provided a fix for the Windows code in get_iphlpapi_dns_info()
when getting the DNS server etc.
This commit is contained in:
parent
747a05844d
commit
0c37ab5255
@ -1,5 +1,10 @@
|
|||||||
Changelog for the c-ares project
|
Changelog for the c-ares project
|
||||||
|
|
||||||
|
* August 21
|
||||||
|
|
||||||
|
- Alfredo Tupone provided a fix for the Windows code in get_iphlpapi_dns_info()
|
||||||
|
when getting the DNS server etc.
|
||||||
|
|
||||||
* June 19
|
* June 19
|
||||||
|
|
||||||
- Added some checks for the addrinfo structure.
|
- Added some checks for the addrinfo structure.
|
||||||
|
@ -327,6 +327,7 @@ static int get_iphlpapi_dns_info (char *ret_buf, size_t ret_size)
|
|||||||
size_t ip_size = sizeof("255.255.255.255,")-1;
|
size_t ip_size = sizeof("255.255.255.255,")-1;
|
||||||
size_t left = ret_size;
|
size_t left = ret_size;
|
||||||
char *ret = ret_buf;
|
char *ret = ret_buf;
|
||||||
|
HRESULT res;
|
||||||
|
|
||||||
if (!fi)
|
if (!fi)
|
||||||
return (0);
|
return (0);
|
||||||
@ -339,7 +340,8 @@ static int get_iphlpapi_dns_info (char *ret_buf, size_t ret_size)
|
|||||||
if (!GetNetworkParams)
|
if (!GetNetworkParams)
|
||||||
goto quit;
|
goto quit;
|
||||||
|
|
||||||
if ((*GetNetworkParams) (fi, &size) != ERROR_BUFFER_OVERFLOW)
|
res = (*GetNetworkParams) (fi, &size);
|
||||||
|
if ((res != ERROR_BUFFER_OVERFLOW) && (res != ERROR_SUCCESS))
|
||||||
goto quit;
|
goto quit;
|
||||||
|
|
||||||
fi = alloca (size);
|
fi = alloca (size);
|
||||||
|
Loading…
Reference in New Issue
Block a user