]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-tcp.c
SMB: Add two missing bounds checks
[tcpdump] / print-tcp.c
index f3b635b4deca7270a7dd515d1db932675d2dbe09..c0a21b9861eb5e28e90c2ff15c187aa69dce4a7e 100644 (file)
@@ -399,7 +399,7 @@ tcp_print(netdissect_options *ndo,
                                 else
                                         ND_PRINT(" (correct)");
                         }
-                } else if (IP_V(ip) == 6 && GET_BE_U_2(ip6->ip6_plen)) {
+                } else if (IP_V(ip) == 6) {
                         if (ND_TTEST_LEN(tp->th_sport, length)) {
                                 sum = tcp6_cksum(ndo, ip6, tp, length);
                                 tcp_sum = GET_BE_U_2(tp->th_sum);
@@ -721,6 +721,8 @@ tcp_print(netdissect_options *ndo,
                 pptp_print(ndo, bp);
         else if (IS_SRC_OR_DST_PORT(REDIS_PORT))
                 resp_print(ndo, bp, length);
+        else if (IS_SRC_OR_DST_PORT(SSH_PORT))
+                ssh_print(ndo, bp, length);
 #ifdef ENABLE_SMB
         else if (IS_SRC_OR_DST_PORT(NETBIOS_SSN_PORT))
                 nbt_tcp_print(ndo, bp, length);