Changeset 7bb2fd4


Ignore:
Timestamp:
06/30/18 18:52:59 (2 years ago)
Author:
Richard Sanger <rsanger@…>
Branches:
cachetimestamps, develop, master, rc-4.0.4, ringdecrementfix, ringperformance
Children:
c171463
Parents:
c95ef4a
Message:

Fix incorrect sizeof()'s checks in pcapng

Fix sizeof()'s which were accidentally checking the pointer size instead of the object.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_pcapng.c

    r32ee9b2 r7bb2fd4  
    454454        }
    455455
    456         if (err < (int)(sizeof(sechdr))) {
     456        if (err < (int)(sizeof(pcapng_sec_t))) {
    457457                trace_set_err(libtrace, TRACE_ERR_BAD_PACKET,
    458458                        "Incomplete pcapng section header block");
     
    529529        }
    530530
    531         if (err < (int)sizeof(inthdr)) {
     531        if (err < (int)sizeof(pcapng_int_t)) {
    532532                trace_set_err(libtrace, TRACE_ERR_BAD_PACKET,
    533533                        "Incomplete pcapng interface header block");
Note: See TracChangeset for help on using the changeset viewer.