mirror of
https://github.com/dgibson/dtc.git
synced 2025-10-13 16:27:39 -04:00
util: Fix out of bounds memory access
The change also fixes numeric values output produced by fdtdump. Signed-off-by: Serge Lamikhov-Center <Serge.Lamikhov@gmail.com>
This commit is contained in:
parent
b290428d71
commit
883238dc50
1 changed files with 1 additions and 1 deletions
2
util.c
2
util.c
|
@ -376,7 +376,7 @@ void utilfdt_print_data(const char *data, int len)
|
|||
|
||||
printf(" = <");
|
||||
for (i = 0; i < len; i += 4)
|
||||
printf("0x%08x%s", fdt32_to_cpu(cell[i]),
|
||||
printf("0x%08x%s", fdt32_to_cpu(cell[i / 4]),
|
||||
i < (len - 4) ? " " : "");
|
||||
printf(">");
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue