Changeset 2d16fc7


Ignore:
Timestamp:
01/14/19 17:28:00 (21 months ago)
Author:
Shane Alcock <salcock@…>
Branches:
develop
Children:
6b7a958
Parents:
e0d922a
Message:

Make sure we have four bytes of ERF payload before probing contents.

The PPP check in format_erf is pretty hax as it is, but we should
at least make sure there is enough data there for our probe to be
looking at legit payload, not just some random memory.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_erf.c

    re0d922a r2d16fc7  
    802802        }
    803803        else {
     804                if (trace_get_capture_length(packet) < 5 ||
     805                                packet->payload == NULL) {
     806                        return ~0;
     807                }
     808
    804809                /* Sigh, lets start wildly guessing */
    805810                if (((char*)packet->payload)[4]==0x45)
Note: See TracChangeset for help on using the changeset viewer.