Changeset 460855d for libwandio


Ignore:
Timestamp:
05/14/13 10:33:25 (8 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:
0acfd1e
Parents:
c73f536
Message:
  • Add an extra byte to the gzip autodetection to decrease the likelihood of genuine data, e.g. the timestamp in the ERF header from an uncompressed trace, accidentally meeting this check
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libwandio/wandio.c

    r91ea76c r460855d  
    142142        len = wandio_peek(io, buffer, sizeof(buffer));
    143143        /* Auto detect gzip compressed data */
    144         if (len>=2 && buffer[0] == '\037' && buffer[1] == '\213') {
     144        if (len>=3 && buffer[0] == '\037' && buffer[1] == '\213' &&
     145                        buffer[2] == 0x08) {
    145146#if HAVE_LIBZ
    146147                DEBUG_PIPELINE("zlib");
Note: See TracChangeset for help on using the changeset viewer.