Changeset 1ed3f1e for lib


Ignore:
Timestamp:
11/28/18 10:57:54 (22 months ago)
Author:
Jacob Van Walraven <jcv9@…>
Branches:
develop
Children:
d74ca03
Parents:
b6ff245
Message:

Prevent trace_construct_packet creating packets will invalid linktype

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/trace.c

    rb6ff245 r1ed3f1e  
    22542254                uint16_t len) {
    22552255
     2256        if (!packet) {
     2257                fprintf(stderr, "NULL packet passed into trace_contruct_packet()\n");
     2258                return;
     2259        }
     2260        /* Check a valid linktype was supplied */
     2261        if (linktype == TRACE_TYPE_UNKNOWN || linktype == TRACE_TYPE_CONTENT_INVALID) {
     2262                fprintf(stderr, "Unknown or invalid linktype passed into trace_construct_packet()\n");
     2263                return;
     2264        }
     2265
    22562266        size_t size;
    22572267        static libtrace_t *deadtrace=NULL;
Note: See TracChangeset for help on using the changeset viewer.