Browse Source

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>
main
Serge Lamikhov-Center 11 years ago committed by David Gibson
parent
commit
883238dc50
  1. 2
      util.c

2
util.c

@ -376,7 +376,7 @@ void utilfdt_print_data(const char *data, int len) @@ -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…
Cancel
Save