mirror of
https://github.com/the-tcpdump-group/tcpdump.git
synced 2024-11-23 10:04:05 +08:00
Juniper: Fix an undefined behavior at runtime
The error was: print-juniper.c:1407:21: runtime error: index 8 out of bounds for type 'uint8_t [8]' Thix fixes GitHub issue #783.
This commit is contained in:
parent
7b575ba803
commit
8c7221d39b
@ -1399,6 +1399,11 @@ juniper_parse_header(netdissect_options *ndo,
|
||||
lp->s,
|
||||
l2info->cookie_len);
|
||||
|
||||
if (l2info->cookie_len > 8) {
|
||||
nd_print_invalid(ndo);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (l2info->cookie_len > 0) {
|
||||
ND_TCHECK_LEN(p, l2info->cookie_len);
|
||||
if (ndo->ndo_eflag)
|
||||
|
Loading…
Reference in New Issue
Block a user