[Skiboot] [PATCH] vsscanf: Fix out of bound write

Stewart Smith stewart at linux.vnet.ibm.com
Fri Nov 13 12:01:49 AEDT 2015


Kamalesh Babulal <kamalesh at linux.vnet.ibm.com> writes:
> Fix of out of bound write in _scanf() by limiting write in to
> tbuf[0..255]. Also, re-format the code to 80 column width
> and remove trailing white spaces.
>
> Fixes Coverity defect#97845.
>
> Signed-off-by: Kamalesh Babulal <kamalesh at linux.vnet.ibm.com>
> ---
>  libc/stdio/vsscanf.c | 51 +++++++++++++++++++++++++++++++--------------------
>  1 file changed, 31 insertions(+), 20 deletions(-)

hi! So, I've been sitting on this for a while as I was kind of lazy and
didn't want to review it too closely because I was pretty sure we barely
use scanf.

It turns out we don't use it at all, so I've opted for the simpler fix:
remove scanf and variants.

This saves 5k from skiboot.lid and removes 500 lines of code from the
repo.

If we ever do need scanf, we can always bring it back.



More information about the Skiboot mailing list