Page MenuHomeFreeBSD

D21220.diff
No OneTemporary

D21220.diff

Index: sbin/ping6/ping6.c
===================================================================
--- sbin/ping6/ping6.c
+++ sbin/ping6/ping6.c
@@ -1379,8 +1379,12 @@
struct tv32 *tv32;
(void)gettimeofday(&tv, NULL);
tv32 = (struct tv32 *)&outpack[ICMP6ECHOLEN];
- tv32->tv32_sec = htonl(tv.tv_sec);
- tv32->tv32_usec = htonl(tv.tv_usec);
+ /*
+ * The time values saved in a packet are
+ * truncated down to 32 bits.
+ */
+ tv32->tv32_sec = (uint32_t)htonl(tv.tv_sec);
+ tv32->tv32_usec = (uint32_t)htonl(tv.tv_usec);
}
cc = ICMP6ECHOLEN + datalen;
}

File Metadata

Mime Type
text/plain
Expires
Fri, Mar 7, 12:47 PM (20 h, 30 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
17032513
Default Alt Text
D21220.diff (586 B)

Event Timeline