mirror of
https://github.com/monero-project/monero.git
synced 2025-06-04 19:39:03 -04:00
Fixed DNS resolution bug in Windows
Due to a bug in unbound, we were passing a string containing a null character to ub_ctx_resolvconf and ub_ctx_hosts rather than a NULL pointer. On *nix this wasn't causing headache, but on Windows this was causing unbound to not correctly load DNS settings from the OS. Note on the bug: in a Windows-specific code branch in the function ub_ctx_hosts(), if the hosts file specified was a NULL pointer, a call to getenv() was stored in a local char* and later freed. This is incorrect, as we do not own that data, and caused the program to crash.
This commit is contained in:
parent
b0151de601
commit
c0de96f8bd
2 changed files with 2 additions and 5 deletions
1
external/unbound/libunbound/libunbound.c
vendored
1
external/unbound/libunbound/libunbound.c
vendored
|
@ -1028,7 +1028,6 @@ ub_ctx_hosts(struct ub_ctx* ctx, const char* fname)
|
|||
"\\hosts");
|
||||
retval=ub_ctx_hosts(ctx, buf);
|
||||
}
|
||||
free(name);
|
||||
return retval;
|
||||
}
|
||||
return UB_READFILE;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue