Skip to content
Snippets Groups Projects
Commit 62cf11c0 authored by Taras Kondratiuk's avatar Taras Kondratiuk Committed by Tom Rini
Browse files

SPL: Limit image name print length


If image name is longer than 32 bytes, then it will be truncated.
This will remove '\0' at the end of the line, so printf will
go out of string limit.

Signed-off-by: default avatarTaras Kondratiuk <taras@ti.com>
Reviewed-by: default avatarTom Rini <trini@ti.com>
parent 6e66bd55
No related branches found
No related tags found
No related merge requests found
......@@ -85,8 +85,9 @@ void spl_parse_image_header(const struct image_header *header)
}
spl_image.os = image_get_os(header);
spl_image.name = image_get_name(header);
debug("spl: payload image: %s load addr: 0x%x size: %d\n",
spl_image.name, spl_image.load_addr, spl_image.size);
debug("spl: payload image: %.*s load addr: 0x%x size: %d\n",
sizeof(spl_image.name), spl_image.name,
spl_image.load_addr, spl_image.size);
} else {
/* Signature not found - assume u-boot.bin */
debug("mkimage signature not found - ih_magic = %x\n",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment