]> git.ipfire.org Git - thirdparty/mtr.git/commitdiff
asn fix from meingtsla, fixes #163. Pong!
authorR.E. Wolff <R.E.Wolff@BitWizard.nl>
Sat, 14 Jan 2017 23:51:47 +0000 (00:51 +0100)
committerR.E. Wolff <R.E.Wolff@BitWizard.nl>
Sat, 14 Jan 2017 23:51:47 +0000 (00:51 +0100)
ui/asn.c

index c38034b1ba88c95debe3f28623d392717cf567b8..622d7ba050e5264d8feec86f923bcdae76588c8b 100644 (file)
--- a/ui/asn.c
+++ b/ui/asn.c
@@ -136,8 +136,7 @@ static char *ipinfo_lookup(const char *domain) {
         txt = (char*)txtrec;
 
     pt++;
-    xstrncpy(txt, (char*) pt, txtlen);
-    txt[txtlen] = 0;
+    xstrncpy(txt, (char*) pt, txtlen + 1);
 
     if (iihash)
         DEB_syslog(LOG_INFO, "Malloc-txt(%p): %s", txt, txt);