]> git.dujemihanovic.xyz Git - u-boot.git/commit
serial: sandbox: Fix buffer underflow in puts
authorAndrew Scull <ascull@google.com>
Mon, 30 May 2022 10:00:01 +0000 (10:00 +0000)
committerTom Rini <trini@konsulko.com>
Thu, 23 Jun 2022 16:58:18 +0000 (12:58 -0400)
commit337b26e4688720560662246eb7703860b68bd6e2
tree876a8b9dc5c3581f6e00a7feb5ee6f650e19dd68
parent9121478ee6f2aee381f8fe49d8997d43527d351a
serial: sandbox: Fix buffer underflow in puts

Fix the buffer underflow that would occur if puts is called with length
of zero.

Fixes: efa51f2bd64 ("serial: sandbox: Implement puts")
Cc: Sean Anderson <sean.anderson@seco.com>
Cc: Simon Glass <sjg@chromium.org>
Reviewed-by: Sean Anderson <sean.anderson@seco.com>
drivers/serial/sandbox.c