Changeset bccdffc for lib


Ignore:
Timestamp:
11/08/18 14:00:04 (2 years ago)
Author:
Shane Alcock <salcock@…>
Branches:
develop, master
Children:
0bb8d49
Parents:
ffe93e5
Message:

Fix issue where reading ERF packets would cause segfaults.

Stupid bug introduced alongside the recent framing length caching.

Location:
lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • lib/format_erf.c

    rf3e1f19 rbccdffc  
    469469                packet->payload = NULL;
    470470        } else {
    471                 packet->payload = (char*)packet->buffer + trace_get_framing_length(packet);
     471                packet->payload = ((char*)packet->buffer) + trace_get_framing_length(packet);
    472472        }
    473473
  • lib/trace.c

    rf3e1f19 rbccdffc  
    986986                         * structure */
    987987                        packet->trace = libtrace;
     988                        packet->which_trace_start = libtrace->startcount;
    988989                        ret=libtrace->format->read_packet(libtrace,packet);
    989990                        if (ret==(size_t)READ_MESSAGE ||
     
    10191020                                trace_packet_set_order(packet, libtrace->sequence_number);
    10201021                        }
    1021                         packet->which_trace_start = libtrace->startcount;
    10221022                        ++libtrace->sequence_number;
    10231023                        if (!libtrace_parallel && packet->trace == libtrace)
Note: See TracChangeset for help on using the changeset viewer.