[PATCH 1/1] cmd: avoid endless loop in sound play command

Simon Glass sjg at chromium.org
Tue Jan 3 18:02:16 CET 2023


On Fri, 30 Dec 2022 at 17:54, Heinrich Schuchardt
<heinrich.schuchardt at canonical.com> wrote:
>
> A parameter starting with a hyphen leads to an endless loop in the sound
> play command.
>
> Leave it to dectoul() to handle the hyphen. It will return 0 for a negative
> number.
>
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
> ---
>  cmd/sound.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

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

Could add a test for this command perhaps


More information about the U-Boot mailing list