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, 26 Sep 2019 19:55:59 +0000 (15:55 -0400)
commit043d3d2b2b7a6fa936ce91e8cb1693308baf2ed3
treedf0e9c688c116ad974f5d7b7552bbe1dcc6b7fa0
parent567232955c426c82d88c05fc58eb6bcd9cca94cf
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.024861 seconds and 4 git commands to generate.