Fix: memcpy of string is larger than source
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 9 Oct 2012 16:47:31 +0000 (12:47 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 9 Oct 2012 16:50:49 +0000 (12:50 -0400)
commit7a673d9947d11a37d08be89a5c157afdfd377f9f
tree7325fee09abed722f0747264439cb5fe3fd1c455
parent25297d71946d0c2430c860a00da8236ec09a2475
Fix: memcpy of string is larger than source

Hollis Blanchard <hollis_blanchard@mentor.com> wrote:
> I seem to have hit a little problem with a "hello world" test app and
> lttng-ust 2.0.3. lttng-ust.git seems to be affected as well. Basically,
> I created a single UST tracepoint, but as soon as I run "lttng
> enable-event -u -a", my app segfaults. The problem seems to be that when
> creating the event to pass to ltt_event_create(), we try to memcpy the
> full 256 bytes of name. However, the name might be shorter, and if we
> get unlucky it falls within 256 bytes of the segment boundary...

Fixing the 3 sites where this issue arise. Manually inspecting all
memcpy in the UST code returned by grep did the job.

Reported-by: Hollis Blanchard <hollis_blanchard@mentor.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
liblttng-ust/ltt-events.c
liblttng-ust/ltt-probes.c
This page took 0.024377 seconds and 4 git commands to generate.