Changeset dc13302 for lib/format_erf.c


Ignore:
Timestamp:
04/24/06 00:02:35 (15 years ago)
Author:
Perry Lorier <perry@…>
Branches:
4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, getfragoff, help, libtrace4, master, ndag_format, pfring, rc-4.0.1, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance, ringtimestampfixes
Children:
8f45780
Parents:
12778c2
Message:

Add assert() suggested by mattb to catch corrupted erf traces (where rlen <
dag_record_size)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_erf.c

    rdd2eaee rdc13302  
    545545        buffer2 = (char*)packet->buffer + dag_record_size;
    546546        size = rlen - dag_record_size;
    547         assert(size < LIBTRACE_PACKET_BUFSIZE);
    548 
    549        
     547
     548        assert(size < LIBTRACE_PACKET_BUFSIZE && size >= dag_record_size);
     549
    550550        /* Unknown/corrupt */
    551551        assert(((dag_record_t *)packet->buffer)->type < 10);
Note: See TracChangeset for help on using the changeset viewer.