linux-stable/tools/lib/subcmd
Ian Rogers 4b96679170 libsubcmd: Avoid SEGV/use-after-free when commands aren't excluded
The array shortening may perform unnecessary array copies.

Before commit 657a3efee4 ("lib subcmd: Avoid memory leak in
exclude_cmds") this was benign, but afterwards this could lead to a
SEGV.

Fixes: 657a3efee4 ("lib subcmd: Avoid memory leak in exclude_cmds")
Signed-off-by: Ian Rogers <irogers@google.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Chenyuan Mi <cymi20@fudan.edu.cn>
Cc: Ian Rogers <irogers@google.com>
Link: https://lore.kernel.org/r/20230707230926.841086-1-irogers@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2023-07-11 16:44:12 -03:00
..
Build
Makefile tools lib subcmd: Add dependency test to install_headers 2022-12-14 11:16:12 -03:00
exec-cmd.c libsubcmd: Avoid two path statics, removing 8192 bytes from .bss 2023-05-28 10:25:55 -03:00
exec-cmd.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
help.c libsubcmd: Avoid SEGV/use-after-free when commands aren't excluded 2023-07-11 16:44:12 -03:00
help.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pager.c tools lib subcmd: Support overwriting the pager 2018-09-19 15:16:19 -03:00
pager.h tools lib subcmd: Support overwriting the pager 2018-09-19 15:16:19 -03:00
parse-options.c libsubcmd: Fix OPTION_GROUP sorting 2022-04-22 12:32:01 +02:00
parse-options.h tools/lib/subcmd: Replace NORETURN usage with __noreturn 2023-05-16 06:31:54 -07:00
run-command.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
run-command.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
sigchain.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
sigchain.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
subcmd-config.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
subcmd-config.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
subcmd-util.h tools/lib/subcmd: Replace NORETURN usage with __noreturn 2023-05-16 06:31:54 -07:00