diff options
author | 2020-07-21 01:09:03 +0000 | |
---|---|---|
committer | 2020-07-21 01:09:03 +0000 | |
commit | 5157c9d7e42432fb29ebdca75fcc4b75a4ac8d0f (patch) | |
tree | bdfed1e5234f37a011cf7a6e0e4a8c5fea6962a5 /usr.bin/mandoc/manpath.c | |
parent | ramdisks got broken by that last diff. (diff) | |
download | wireguard-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