Changeset 4161a69


Ignore:
Timestamp:
11/19/18 11:37:14 (2 years ago)
Author:
Shane Alcock <salcock@…>
Branches:
develop
Children:
8a12a49
Parents:
412550d
Message:

Don't attempt to memmove NULL packet payload

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/trace.c

    r0bb8d49 r4161a69  
    21512151         * moving data around within this packet, so ordering is important.
    21522152         */
    2153         memmove(packet->payload, data, (size_t)len);
     2153        if (data != NULL) {
     2154                memmove(packet->payload, data, (size_t)len);
     2155        } else {
     2156                packet->payload = NULL;
     2157        }
    21542158        memmove(packet->header, &hdr, sizeof(hdr));
    21552159        packet->type=pcap_linktype_to_rt(libtrace_to_pcap_linktype(linktype));
Note: See TracChangeset for help on using the changeset viewer.