efi/printf: Turn vsprintf into vsnprintf
authorArvind Sankar <nivedita@alum.mit.edu>
Mon, 18 May 2020 19:07:08 +0000 (15:07 -0400)
committerArd Biesheuvel <ardb@kernel.org>
Tue, 19 May 2020 08:32:04 +0000 (10:32 +0200)
commit8fb331e10b63888e944a8a0dcf79b17e93b475ba
tree36be9c5f83b1096e6d427084d39694986b1d37ad
parentf97ca2c816748e3b7dee58775632f9e9269071e6
efi/printf: Turn vsprintf into vsnprintf

Implement vsnprintf instead of vsprintf to avoid the possibility of a
buffer overflow.

Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu>
Link: https://lore.kernel.org/r/20200518190716.751506-17-nivedita@alum.mit.edu
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
drivers/firmware/efi/libstub/efi-stub-helper.c
drivers/firmware/efi/libstub/vsprintf.c