From: Jérémie Galarneau Date: Thu, 19 Sep 2019 18:18:50 +0000 (-0400) Subject: Revert "lttng: fix: out-of-bounds copy of original 'view' command arguments" X-Git-Tag: v2.11.0-rc4~18 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=eebd55175f1a7d330b5a0b3d1c04a9bef38db403;p=lttng-tools.git Revert "lttng: fix: out-of-bounds copy of original 'view' command arguments" This reverts commit fc1465822a1075d98160bb74ae8e974ac8c010a8 as it broke the 'lttng view' command on live sessions. The original commit was meant to fix a warning, but it was (evidently) not an appropriate change. Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng/commands/view.c b/src/bin/lttng/commands/view.c index 237ea4a15..0325e505c 100644 --- a/src/bin/lttng/commands/view.c +++ b/src/bin/lttng/commands/view.c @@ -188,7 +188,7 @@ static char **alloc_argv_from_local_opts(const char **opts, size_t opts_len, goto error; } - memcpy(argv, opts, opts_len); + memcpy(argv, opts, size); if (session_live_mode) { argv[opts_len] = "-i";