mirror of
https://github.com/zeek/zeek.git
synced 2025-10-12 19:48:20 +00:00
VLAN: Fix length checking for non-Ethernet type 2 frames
(cherry picked from commit c579eb7b7cf3ca1d9008e74d7934155866c7e4f7)
This commit is contained in:
parent
a0c384015a
commit
02af9a9787
1 changed files with 2 additions and 1 deletions
|
@ -38,7 +38,8 @@ bool VLANAnalyzer::AnalyzePacket(size_t len, const uint8_t* data, Packet* packet
|
|||
len -= 4;
|
||||
data += 4;
|
||||
|
||||
if ( len < protocol )
|
||||
// Need at least two bytes to check the packet types below.
|
||||
if ( len < 2 )
|
||||
{
|
||||
Weird("truncated_vlan_frame", packet);
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue