summaryrefslogtreecommitdiffstats
path: root/usr.bin/mandoc/manpath.c
diff options
context:
space:
mode:
authorkn <kn@openbsd.org>2020-07-21 01:09:03 +0000
committerkn <kn@openbsd.org>2020-07-21 01:09:03 +0000
commit5157c9d7e42432fb29ebdca75fcc4b75a4ac8d0f (patch)
treebdfed1e5234f37a011cf7a6e0e4a8c5fea6962a5 /usr.bin/mandoc/manpath.c
parentramdisks got broken by that last diff. (diff)
downloadwireguard-openbsd-5157c9d7e42432fb29ebdca75fcc4b75a4ac8d0f.tar.xz
wireguard-openbsd-5157c9d7e42432fb29ebdca75fcc4b75a4ac8d0f.zip
Avoid integer underflow due to tiny snaplen
For DLT_NULL and DLT_LOOP interfaces, print-null.c passes `caplen - NULL_HDRLEN' as length to default_print() which takes an unsigned integer, hence if caplen is smaller than the header itself (four octets), this difference wraps around. Exit early in such cases and print the expected truncation marker "[|null]" instead. Feedback OK dlg
Diffstat (limited to 'usr.bin/mandoc/manpath.c')
0 files changed, 0 insertions, 0 deletions