UPSTREAM: SPL: fix printing of image name

The maximum length of the name of the image is
obviously not sizeof(), which is just the
length of a pointer, but IH_NMLEN.

fixes: 62cf11c092
("SPL: Limit image name print length")

Change-Id: I948dee1b9a4e1ddfbb122475e2d209cc26dec9d0
Signed-off-by: André Draszik <adraszik@tycoint.com>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 3fe3839acc4a5d9b1af9b2ab3884b0d3f2e23370)
This commit is contained in:
André Draszik
2017-10-03 16:55:50 +01:00
committed by Kever Yang
parent 1abc22cc20
commit 75ee777bcd
+1 -1
View File
@@ -154,7 +154,7 @@ int spl_parse_image_header(struct spl_image_info *spl_image,
spl_image->os = image_get_os(header);
spl_image->name = image_get_name(header);
debug("spl: payload image: %.*s load addr: 0x%lx size: %d\n",
(int)sizeof(spl_image->name), spl_image->name,
IH_NMLEN, spl_image->name,
spl_image->load_addr, spl_image->size);
#else
/* LEGACY image not supported */