diff mbox series

[U-Boot,v2,1/5] SPL: fix printing of image name

Message ID 20171003155554.10705-1-git@andred.net
State Accepted
Delegated to: Simon Glass
Headers show
Series [U-Boot,v2,1/5] SPL: fix printing of image name | expand

Commit Message

André Draszik Oct. 3, 2017, 3:55 p.m. UTC
From: André Draszik <adraszik@tycoint.com>

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: 62cf11c0921a90c6bd62344f4bc069668e6c698c
("SPL: Limit image name print length")

Signed-off-by: André Draszik <adraszik@tycoint.com>
---
 common/spl/spl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

André Draszik Nov. 1, 2017, 9:09 a.m. UTC | #1
Hi,


On Tue, 2017-10-03 at 16:55 +0100, André Draszik wrote:
> From: André Draszik <adraszik@tycoint.com>
> 
> 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: 62cf11c0921a90c6bd62344f4bc069668e6c698c
> ("SPL: Limit image name print length")
> 
> Signed-off-by: André Draszik <adraszik@tycoint.com>

I see these patches haven't been merged yet, is there anything wrong?


Cheers,
Andre'
Simon Glass Nov. 17, 2017, 2:05 p.m. UTC | #2
Hi Andre,

On 1 November 2017 at 03:09, André Draszik <git@andred.net> wrote:
>
> Hi,
>
>
> On Tue, 2017-10-03 at 16:55 +0100, André Draszik wrote:
> > From: André Draszik <adraszik@tycoint.com>
> >
> > 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: 62cf11c0921a90c6bd62344f4bc069668e6c698c
> > ("SPL: Limit image name print length")
> >
> > Signed-off-by: André Draszik <adraszik@tycoint.com>
>
> I see these patches haven't been merged yet, is there anything wrong?

I just found them in my queue, but was not on cc.

Acked-by: Simon Glass <sjg@chromium.org>
Simon Glass Nov. 17, 2017, 3:41 p.m. UTC | #3
Hi Andre,

On 1 November 2017 at 03:09, André Draszik <git@andred.net> wrote:
>
> Hi,
>
>
> On Tue, 2017-10-03 at 16:55 +0100, André Draszik wrote:
> > From: André Draszik <adraszik@tycoint.com>
> >
> > 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: 62cf11c0921a90c6bd62344f4bc069668e6c698c
> > ("SPL: Limit image name print length")
> >
> > Signed-off-by: André Draszik <adraszik@tycoint.com>
>
> I see these patches haven't been merged yet, is there anything wrong?

I just found them in my queue, but was not on cc.

Acked-by: Simon Glass <sjg@chromium.org>

Applied to u-boot-dm thanks!
diff mbox series

Patch

diff --git a/common/spl/spl.c b/common/spl/spl.c
index 4afbe97fc1..7c7467ecd2 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -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 */