mirror of
https://github.com/zeek/zeek.git
synced 2025-10-05 16:18:19 +00:00

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.
13 lines
294 B
Text
13 lines
294 B
Text
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
|
|
0, 6, ISATAP
|
|
27, 9, WORKGROUP
|
|
1, 15, \x01\x02__MSBROWSE__\x02
|
|
3, 6, MARTIN
|
|
69, 15, THE NETBIOS NAM
|
|
0, 15, !"#$%&'()*+,-.=
|
|
0, 8, :;@^_{}~
|
|
0, 0,
|
|
32, 0,
|
|
256, 0,
|
|
256, 0,
|
|
256, 0,
|