[U-Boot] [PATCH V2] sandbox: terminate os_dirent_ls() result list
Simon Glass
sjg at chromium.org
Thu Jun 12 06:23:20 CEST 2014
On 11 June 2014 12:26, Stephen Warren <swarren at wwwdotorg.org> wrote:
> From: Stephen Warren <swarren at nvidia.com>
>
> Each node in the linked-list that os_dirent_ls() returns has its next
> pointer set only when the next node is created. For the last node in the
> list, there is no next node, so this never happens, and the next pointer
> is never initialized. Explicitly initialize the next pointer so that it
> isn't dangling. Without this, "sb ls" might crash.
>
> Signed-off-by: Stephen Warren <swarren at nvidia.com>
Acked-by: Simon Glass <sjg at chromium.org>
More information about the U-Boot
mailing list