> I believe the bug is in incorrect pointer handling at print_echo() (see
> patch below). Possibly the bug does not manifest itself on architectures
> where sizeof(timeval) == sizeof(icmp6_hdr).
Michal's patch fixes it for me (GNU/Linux x86_64). Can anyone confirm
if it breaks anything on other systems? If not, then I plan to commit
the following patch on Michal's behalf:
diff -urNp inetutils/ping/ping6.c inetutils-build/ping/ping6.c
--- inetutils/ping/ping6.c 2007-12-10 21:17:19.000000000 +0530
+++ inetutils-build/ping/ping6.c 2008-04-19 22:42:53.000000000 +0530
@@ -449,7 +449,7 @@ print_echo (int dupflag, int hops, struc
struct timeval tv1, *tp;
timing++;
- tp = (struct timeval *) icmp6 + 1;
+ tp = (struct timeval *) (icmp6 + 1);
/* Avoid unaligned data: */
memcpy (&tv1, tp, sizeof (tv1));
diff -urNp inetutils/ChangeLog inetutils-build/ChangeLog
--- inetutils/ChangeLog 2008-04-19 09:27:05.000000000 +0530
+++ inetutils-build/ChangeLog 2008-04-20 08:38:51.000000000 +0530
@@ -1,3 +1,8 @@
+2008-04-20 Michal Svoboda <[EMAIL PROTECTED]> (tiny change)
+
+ * ping/ping6.c (print_echo): Cast ICMP6+1 and not ICMP6 to
+ `struct timeval *'.
+
2008-04-19 Debarshi Ray <[EMAIL PROTECTED]>
* traceroute/traceroute.c: Added new switch --type.
Happy hacking,
Debarshi
--
"From what we get, we can make a living; what we give, however, makes a life."
-- Arthur Ashe
_______________________________________________
bug-inetutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-inetutils