]> git.ipfire.org Git - people/ms/linux.git/commit
modpost: use snprintf() instead of sprintf() for safety
authorMasahiro Yamada <masahiroy@kernel.org>
Sun, 24 Apr 2022 19:07:45 +0000 (04:07 +0900)
committerMasahiro Yamada <masahiroy@kernel.org>
Sat, 7 May 2022 18:16:59 +0000 (03:16 +0900)
commit15a28c7c72917f96820e9e9ccd113606363ba3ac
tree491b81b105d4a0fad6acf8fc1aea033530302973
parentf4d40868fc4dcfd5db4999149b13fea3902c8883
modpost: use snprintf() instead of sprintf() for safety

Use snprintf() to avoid the potential buffer overflow, and also
check the return value to detect the too long path.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
scripts/mod/modpost.c