Changeset 4854e88


Ignore:
Timestamp:
01/11/19 14:05:42 (23 months ago)
Author:
Shane Alcock <salcock@…>
Branches:
develop
Children:
9a792a9
Parents:
6d2a120
Message:

Don't return uninitialised timevals / timespecs on error

Bug was introduced into both pcapfile and pcapng formats.

Location:
lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • lib/format_pcapfile.c

    r9a6bdbc r4854e88  
    589589        struct timeval ts;
    590590
     591        memset(&ts, 0, sizeof(struct timeval));
     592
    591593        if (!packet) {
    592594                fprintf(stderr, "NULL packet passed to pcapfile_get_timeval()\n");
     
    618620        struct timespec ts;
    619621
     622        memset(&ts, 0, sizeof(struct timespec));
    620623        if (!packet) {
    621624                fprintf(stderr, "NULL packet passed to pcapfile_get_timespec()");
  • lib/format_pcapng.c

    rfce4572 r4854e88  
    18291829        uint32_t interfaceid = 0;
    18301830        pcapng_interface_t *interface;
     1831
     1832        memset(&ts, 0, sizeof(struct timespec));
    18311833
    18321834        if (!packet) {
Note: See TracChangeset for help on using the changeset viewer.