"Das U-Boot" Source Tree
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

upl: Fix buf array size

Size of array buf was incorrect due to sizeof returning the
size of an integer (typically 32 bits) instead of a u64 type
(64 bits). Hence, buf array was shorter than expected.

Signed-off-by: Francois Berder <fberder@outlook.fr>
Reviewed-by: Simon Glass <sjg@chromium.org>

authored by

Francois Berder and committed by
Tom Rini
8385ecc8 74c68b54

+3 -3
+3 -3
boot/upl_write.c
··· 301 301 for (i = 0; i < upl->mem.count; i++) { 302 302 const struct upl_mem *mem = alist_get(&upl->mem, i, 303 303 struct upl_mem); 304 - char buf[mem->region.count * sizeof(64) * 2]; 304 + char buf[mem->region.count * sizeof(u64) * 2]; 305 305 const struct memregion *first; 306 306 char name[26]; 307 307 int ret, len; ··· 354 354 for (i = 0; i < upl->memmap.count; i++) { 355 355 const struct upl_memmap *memmap = alist_get(&upl->memmap, i, 356 356 struct upl_memmap); 357 - char buf[memmap->region.count * sizeof(64) * 2]; 357 + char buf[memmap->region.count * sizeof(u64) * 2]; 358 358 const struct memregion *first; 359 359 char name[26]; 360 360 int ret, len; ··· 411 411 for (i = 0; i < upl->memres.count; i++) { 412 412 const struct upl_memres *memres = alist_get(&upl->memres, i, 413 413 struct upl_memres); 414 - char buf[memres->region.count * sizeof(64) * 2]; 414 + char buf[memres->region.count * sizeof(u64) * 2]; 415 415 const struct memregion *first; 416 416 char name[26]; 417 417 int ret, len;