Skip to content

Commit 4aaa35c

Browse files
dankmeme01Renegade334
authored andcommitted
deps: c-ares: cherry-pick 8ba37af8e3fb
Original commit message: Fixes #1056 The commit c-ares/c-ares@1d1b3d4 refactored the function to use wide strings, but didn't touch this check. Because an empty wide string would now be size 2 and not 1, the empty string would go on and cause the DNS domain list to be replaced with nothing. Signed-off-by: @dankmeme01 Refs: c-ares/c-ares@8ba37af
1 parent bfb2fa7 commit 4aaa35c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

deps/cares/src/lib/ares_sysconfig_win.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ static ares_bool_t get_REG_SZ(HKEY hKey, const WCHAR *leafKeyName, char **outptr
106106

107107
/* Get the value for real */
108108
res = RegQueryValueExW(hKey, leafKeyName, 0, NULL, (BYTE *)val, &size);
109-
if (res != ERROR_SUCCESS || size == 1) {
109+
if (res != ERROR_SUCCESS || size == sizeof(WCHAR)) {
110110
ares_free(val);
111111
return ARES_FALSE;
112112
}

0 commit comments

Comments
 (0)