]> git.baikalelectronics.ru Git - uboot.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)
commit3017ca086d19599d1413ccd8b13d22035d5f1fb7
treeec9c0dcb1397e1887d7c0f7b8ea45ddf2dab63d7
parentb3ef0ad6076debb3fe0a6a4c4233dc6c9656aba8
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