mirror of
https://github.com/the-tcpdump-group/tcpdump.git
synced 2024-11-27 03:53:53 +08:00
L2TP: Add a bounds check
Check if the offset padding octets are in the packet buffer.
This commit is contained in:
parent
5757761072
commit
5d000b0773
@ -807,6 +807,8 @@ l2tp_print(netdissect_options *ndo, const u_char *dat, u_int length)
|
||||
|
||||
if (flag_o) { /* Offset Size */
|
||||
pad = GET_BE_U_2(ptr);
|
||||
/* Offset padding octets in packet buffer? */
|
||||
ND_TCHECK_LEN(ptr + 2, pad);
|
||||
ptr += (2 + pad);
|
||||
cnt += (2 + pad);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user