]> git.dujemihanovic.xyz Git - u-boot.git/commit
cmd: fdt: Handle 64bit pointers in fdt get addr
authorMarek Vasut <marek.vasut+renesas@mailbox.org>
Thu, 2 Mar 2023 03:08:21 +0000 (04:08 +0100)
committerSimon Glass <sjg@chromium.org>
Thu, 9 Mar 2023 16:50:47 +0000 (08:50 -0800)
commit98d114e75c888ed7a8313a14e778f45d388199c4
treeec9c0dcb1397e1887d7c0f7b8ea45ddf2dab63d7
parent068b7d9ed379e5376550709bd3c238d2777a3cfe
cmd: fdt: Handle 64bit pointers in fdt get addr

The command assumed 32bit pointers so far, with 64bit pointer the
command would overwrite a piece of stack. Fix it by extending the
array size to cater for 64bit pointer, and use snprintf() to avoid
writing past the end of the array ever again.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
cmd/fdt.c