]> git.baikalelectronics.ru Git - kernel.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)
commit46769a2b7baa4e4e3f0800711f57b57145a8b0eb
tree491b81b105d4a0fad6acf8fc1aea033530302973
parent5ff477e48c0eb58280a47e17e0c9de21c7b0994b
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