summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTaras Kondratiuk <taras@ti.com>2013-07-16 14:45:01 +0300
committerTom Rini <trini@ti.com>2013-08-16 13:45:15 -0400
commit62cf11c0921a90c6bd62344f4bc069668e6c698c (patch)
treec9a5930774a26a783a9be6a003533013488dbf5e
parent6e66bd55917bee1a37ae6387ae1d480aaad0102d (diff)
downloadu-boot-imx-62cf11c0921a90c6bd62344f4bc069668e6c698c.zip
u-boot-imx-62cf11c0921a90c6bd62344f4bc069668e6c698c.tar.gz
u-boot-imx-62cf11c0921a90c6bd62344f4bc069668e6c698c.tar.bz2
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: Taras Kondratiuk <taras@ti.com> Reviewed-by: Tom Rini <trini@ti.com>
-rw-r--r--common/spl/spl.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/common/spl/spl.c b/common/spl/spl.c
index d6b0e01..da31457 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -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",