From a11f445332e62df924c041ce3917be56fbc491d0 Mon Sep 17 00:00:00 2001 From: Sami Kerola Date: Sun, 4 Sep 2016 00:49:06 +0100 Subject: [PATCH] crash fix: never return const string as address String that comes from #define can cause SIGSEGV. --- asn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asn.c b/asn.c index c6454cf..a19671f 100644 --- a/asn.c +++ b/asn.c @@ -90,7 +90,7 @@ static char *ipinfo_lookup(const char *domain) { if((len = res_query(domain, C_IN, T_TXT, answer, PACKETSZ)) < 0) { if (iihash) DEB_syslog(LOG_INFO, "Malloc-txt: %s", UNKN); - return (iihash) ? xstrdup(UNKN) : UNKN; + return xstrdup(UNKN); } pt = answer + sizeof(HEADER); -- 2.47.3