From: Sami Kerola Date: Sat, 3 Sep 2016 23:49:06 +0000 (+0100) Subject: crash fix: never return const string as address X-Git-Tag: v0.88~26^2~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a11f445332e62df924c041ce3917be56fbc491d0;p=thirdparty%2Fmtr.git crash fix: never return const string as address String that comes from #define can cause SIGSEGV. --- 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);