Changeset f65c480


Ignore:
Timestamp:
06/08/09 11:14:17 (12 years ago)
Author:
Shane Alcock <salcock@…>
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:
a7e85bf
Parents:
327b1df
Message:
  • Check for errors / EOF before asserting based on the contents of what we've supposedly read from the trace
File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_pcapfile.c

    r327b1df rf65c480  
    295295                        sizeof(libtrace_pcapfile_pkt_hdr_t));
    296296
    297         assert(swapl(libtrace,((libtrace_pcapfile_pkt_hdr_t*)packet->buffer)->caplen)<LIBTRACE_PACKET_BUFSIZE);
    298 
    299297        if (err<0) {
    300298                trace_set_err(libtrace,errno,"reading packet");
     
    305303                return 0;
    306304        }
     305       
     306        assert(swapl(libtrace,((libtrace_pcapfile_pkt_hdr_t*)packet->buffer)->caplen)<LIBTRACE_PACKET_BUFSIZE);
     307
    307308
    308309        err=wandio_read(libtrace->io,
Note: See TracChangeset for help on using the changeset viewer.