]> git.ipfire.org Git - thirdparty/mtr.git/commitdiff
Slight cleanup, but no fix for code that came up in a bugreport.
authorR.E. Wolff <R.E.Wolff@BitWizard.nl>
Sat, 3 Apr 2021 08:25:41 +0000 (10:25 +0200)
committerR.E. Wolff <R.E.Wolff@BitWizard.nl>
Sat, 3 Apr 2021 08:25:41 +0000 (10:25 +0200)
SECURITY
TODO
ui/asn.c

index 82c697c461182ac51a5baac2dc1e3b2a35e97de6..3dae7e57d92cb4066370dc5b9b7d6e889f9d1cc9 100644 (file)
--- a/SECURITY
+++ b/SECURITY
@@ -35,7 +35,7 @@ minimal.
 3. Make mtr-packet a setuid-root binary.
 
 The mtr-packet binary can be made setuid-root, which is what "make install"
-does by default.
+does only if using setcap (above) fails.  Using setcap is tried first.
 
 When mtr-packet is installed as suid-root, some concern over security is
 justified.  mtr-packet does the following two things after it is launched:
diff --git a/TODO b/TODO
index ed8950f88e9f782a15c65e6d2a4b00841294dd33..99720c87b541192eab7b49ef420e2e60b2401792 100644 (file)
--- a/TODO
+++ b/TODO
@@ -23,6 +23,8 @@ Oh, Feel free to provide suggestions for this list.
 
 ----------------------------------------------------------------------
 
+- cleanup
+  - cleanup warnings that the newer GCC produces. 
 
 - Stuff to implement:
 
index 2310a1bc04b36c7fc53f509be208b31331db2c7e..4790d6a4c0fdccdeda9bffc65818c6f82b42913b 100644 (file)
--- a/ui/asn.c
+++ b/ui/asn.c
@@ -207,11 +207,11 @@ static void reverse_host6(
 {
     int i;
     char *b = buff;
-    for (i = (sizeof(*addr) / 2 - 1); i >= 0; i--, b += 4)      /* 64b portion */
+    // We need to process the top 64 bits, or 8 bytes. 
+    for (i = 8-1; i >= 0; i--, b += 4, buff_length -= 4)
         snprintf(b, buff_length,
                  "%x.%x.", addr->s6_addr[i] & 0xf, addr->s6_addr[i] >> 4);
-
-    buff[strlen(buff) - 1] = '\0';
+    *--b = 0;
 }
 #endif