boot: Handle running out of labels
authorSimon Glass <sjg@chromium.org>
Sat, 15 Mar 2025 14:25:59 +0000 (14:25 +0000)
committerTom Rini <trini@konsulko.com>
Thu, 3 Apr 2025 17:43:22 +0000 (11:43 -0600)
commit199648bac156daaaad1c66c52dcd33250a272e69
treea940eb331fac2c38417da848319482194f1aeba4
parent6acb0d28b06c408740e8b80e4015e1e656c7faf4
boot: Handle running out of labels

If only a single label is provided in the list, bootdev_next_label()
does not operate correctly and reads beyond the end of the pointer list.

Fix this by adding a new check. Also add a note to convert this array
to an alist

Signed-off-by: Simon Glass <sjg@chromium.org>
boot/bootdev-uclass.c
include/bootstd.h