mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
Fix assertion to actually have a chance of failing
This assertion can only fail if we mess up some of our other code, but let's try to get it right. Closes 22244.
This commit is contained in:
+3
-2
@@ -160,8 +160,9 @@ evdns_log_cb(int warn, const char *msg)
|
||||
}
|
||||
if (!strcmpstart(msg, "Nameserver ") && (cp=strstr(msg, " has failed: "))) {
|
||||
char *ns = tor_strndup(msg+11, cp-(msg+11));
|
||||
const char *err = strchr(cp, ':')+2;
|
||||
tor_assert(err);
|
||||
const char *colon = strchr(cp, ':');
|
||||
tor_assert(colon);
|
||||
const char *err = colon+2;
|
||||
/* Don't warn about a single failed nameserver; we'll warn with 'all
|
||||
* nameservers have failed' if we're completely out of nameservers;
|
||||
* otherwise, the situation is tolerable. */
|
||||
|
||||
Reference in New Issue
Block a user