Adjust default_print() to not run over snapend.
authorclaudio <claudio@openbsd.org>
Tue, 28 Feb 2023 10:04:50 +0000 (10:04 +0000)
committerclaudio <claudio@openbsd.org>
Tue, 28 Feb 2023 10:04:50 +0000 (10:04 +0000)
commit2b7cc9f7bdbb904bcb6bd8f480378653a3842200
tree366760700bc19dfc9529365db03d334445cb6694
parenta4a4354d6a6136f25e8616a09f7d2e21e354b530
Adjust default_print() to not run over snapend.

Kill default_print_unaligned() and adjust default_print() to also work
with unaligned buffers. There is no need for two functions doing the
same thing.

Pass the right length in nsh_print to default_print(). Fixes on place
that makes tcpdump crash.
Reported by Peter J. Philipp (pjp at delphinusdns dot org)
OK mbuhl@
usr.sbin/tcpdump/interface.h
usr.sbin/tcpdump/print-isoclns.c
usr.sbin/tcpdump/print-llc.c
usr.sbin/tcpdump/print-nsh.c
usr.sbin/tcpdump/tcpdump.c