]> git.ipfire.org Git - thirdparty/kmod.git/commit
modprobe: fix the NULL-termination of new_argv
authorMasahiro Yamada <masahiroy@kernel.org>
Thu, 10 Feb 2022 02:14:22 +0000 (11:14 +0900)
committerLucas De Marchi <lucas.demarchi@intel.com>
Mon, 4 Apr 2022 15:14:40 +0000 (08:14 -0700)
commit757b3599236c0fee9e2bb0770eb6b7c84a271276
tree63247c38ce4b49861296f58b4d3fdaaba1791230
parentf50e2d67575ac5f256fb853ca9d29aeac92d9a57
modprobe: fix the NULL-termination of new_argv

The number of new arguments is (i + argc - 1) as it is set to *p_argc
one line below.

The correct location of NULL termination is new_argv[i + argc - 1].

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
tools/modprobe.c