Project

General

Profile

Bug #833

memcpy of non-packed struct into packed struct (possible layout mismatch)

Added by Mathieu Desnoyers over 6 years ago. Updated almost 5 years ago.

Status:
Confirmed
Priority:
Normal
Assignee:
-
Target version:
Start date:
09/09/2014
Due date:
% Done:

0%

Estimated time:

Description

lttng-tools src/lib/lttng-ctl/lttng-ctl.c:

lttng_enable_event_with_exclusions()

memcpy(&lsm.u.enable.event, ev, sizeof(lsm.u.enable.event));

copy "ev" (non-packed) into a packed structure.

We should copy each field one by one (create a copy_event_to_event_packed() helper to do so).

Also available in: Atom PDF