kbuild: replace unbounded sprintf call in modpost
authorKees Cook <keescook@chromium.org>
Fri, 25 Oct 2013 13:14:43 +0000 (06:14 -0700)
committerMichal Marek <mmarek@suse.cz>
Wed, 6 Nov 2013 21:30:03 +0000 (22:30 +0100)
The modpost tool could overflow its stack buffer if someone was running
with an insane shell environment. Regardless, it's technically a bug,
so this fixes it to truncate the string instead of seg-faulting.

Found by Coverity.

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>

No differences found