forked from osmocom/wireshark
Sanity check iSeries packet length to prevent heap-based buffer overflow.
Bug: 11798 Change-Id: I7aebe709ef4014a385819835ef6effabbb4f0ca4 Reviewed-on: https://code.wireshark.org/review/12238 Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
parent
44d98dafd4
commit
38c53f9800
|
@ -588,7 +588,7 @@ iseries_parse_packet (wtap * wth, FILE_T fh, struct wtap_pkthdr *phdr,
|
||||||
"%12s%*[ \n\t]%12s%*[ \n\t]ETHV2%*[ \n\t]TYPE:%*[ \n\t]%4s",
|
"%12s%*[ \n\t]%12s%*[ \n\t]ETHV2%*[ \n\t]TYPE:%*[ \n\t]%4s",
|
||||||
&pktnum, direction, &pkt_len, &hr, &min, &sec, csec, destmac,
|
&pktnum, direction, &pkt_len, &hr, &min, &sec, csec, destmac,
|
||||||
srcmac, type);
|
srcmac, type);
|
||||||
if (num_items_scanned == 10)
|
if ((num_items_scanned == 10) && (pkt_len >= 0))
|
||||||
{
|
{
|
||||||
/* OK! We found the packet header line */
|
/* OK! We found the packet header line */
|
||||||
isValid = TRUE;
|
isValid = TRUE;
|
||||||
|
|
Loading…
Reference in New Issue