mirror of
https://github.com/zeek/zeek.git
synced 2025-10-03 07:08:19 +00:00
Fixes to decode_netbios_name
and decode_netbios_name_type
BIFs
Fixes to `decode_netbios_name`: * Improve validation that input string is a NetBIOS encoding (32 bytes, with characters ranging from 'A' to 'P'). This helps prevent Undefined Behavior of left-shifting negative values. Invalid encodings now cause a return-value of an empty string. * More liberal in what decoded characters are allowed. Namely, spaces are now allowed (but any trailing null-bytes and spaces are trimmed, similar to before). Fixes to `decode_netbios_name_type`: * Improve validation that input string is a NetBIOS encoding (32 bytes, with characters ranging from 'A' to 'P'). This helps prevent Undefined Behavior of left-shifting negative values and a heap-buffer-overread when the input string is too small. Invalid encodings now cause a return-value of 256.
This commit is contained in:
parent
b44ae62ce4
commit
76fb1e7fd0
5 changed files with 90 additions and 33 deletions
|
@ -1 +1 @@
|
|||
d15d95ad14e8974d828f9ee64fcd6cb313f004a2
|
||||
2e7a42892a8cf429787246dbba3927685799b56f
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue