diff --git a/net/trafshow/patches/patch-display_c b/net/trafshow/patches/patch-display_c new file mode 100644 index 00000000000..8957f5464b0 --- /dev/null +++ b/net/trafshow/patches/patch-display_c @@ -0,0 +1,21 @@ +--- display.c.bak.orig Mon Aug 24 00:51:48 1998 ++++ display.c Tue Aug 28 17:35:19 2001 +@@ -386,18 +386,18 @@ + clrtoeol(); + goto refresh_screen; + } + sport = ntohs(((struct udphdr *)cp)->uh_sport); + dport = ntohs(((struct udphdr *)cp)->uh_dport); + } else if (ip->ip_p == IPPROTO_ICMP) { +- if (cp + sizeof(struct icmp) > snapend || +- iplen - hlen < sizeof(struct icmp)) { ++ if (cp + 4 > snapend || ++ iplen - hlen < 4) { + mvprintw(LINES-1, err_pos, "\ + truncated-icmp: wrong ip hdrlen"); + clrtoeol(); + goto refresh_screen; + } + sport = ((struct icmp *)cp)->icmp_type; + } + }