X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/cfa9ab5f80dd9a1024e1a765bc0d24c57652b6bc..c39d40a767a1ae36171e5bcbf6f157ff3e80fb6c:/print-l2tp.c diff --git a/print-l2tp.c b/print-l2tp.c index 184ff752..024705f8 100644 --- a/print-l2tp.c +++ b/print-l2tp.c @@ -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); }