From: Taras Kondratiuk Date: Tue, 16 Jul 2013 11:45:01 +0000 (+0300) Subject: SPL: Limit image name print length X-Git-Tag: v2013.10-rc1~28 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=62cf11c0921a90c6bd62344f4bc069668e6c698c;p=u-boot 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 Reviewed-by: Tom Rini --- diff --git a/common/spl/spl.c b/common/spl/spl.c index d6b0e01075..da31457d5f 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",