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:34:43 +0000 (15:34 -0400)
commit761ff79c14252befe0a72ae65e52f2cfee8992b4
treecf696e77b7905dd56eddebe2903b5091f185a0b2
parent171829b7b967fea8134c6204c9b87fc3324fb2c7
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.026769 seconds and 4 git commands to generate.