Fix: lttng: out-of-bound copy of arguments in 'view' command handler
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 19 Sep 2019 18:24:34 +0000 (14:24 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 19 Sep 2019 19:31:49 +0000 (15:31 -0400)
commit659d0f1d6df4a7598da90f0a7f2c2d26a4548ef6
tree9f1df56446cfd174a7c084ed3b19d2a557ad2efc
parenteebd55175f1a7d330b5a0b3d1c04a9bef38db403
Fix: lttng: out-of-bound copy of arguments in 'view' command handler

The 'size' operand of memcpy() does not indicate the length of the
opts array; it is the size of the resulting array once the opts array
is concatenated with the options being added in this function. This
results in out-of-bound read(s) in the opts array.

Use 'sizeof(char *) * opts_len' as the length to copy at the beginning
of the resulting array.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng/commands/view.c
This page took 0.025432 seconds and 4 git commands to generate.