[PATCH 4/8] usb: sandbox: Check for string end in copy_to_unicode()

Simon Glass sjg at chromium.org
Mon Apr 11 20:35:27 CEST 2022


On Sun, 3 Apr 2022 at 04:39, Andrew Scull <ascull at google.com> wrote:
>
> When copying the string in copy_to_unicode(), check for the null
> terminator in each position, not just at the start, to avoid reading
> beyond the end of the string.
>
> Signed-off-by: Andrew Scull <ascull at google.com>
> Cc: Simon Glass <sjg at chromium.org>
> Cc: Marek Vasut <marex at denx.de>
> ---
>  drivers/usb/emul/usb-emul-uclass.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)

Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list