summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSerge Lamikhov-Center <Serge.Lamikhov@gmail.com>2013-09-30 11:04:26 +0300
committerDavid Gibson <david@gibson.dropbear.id.au>2013-10-01 14:21:18 +1000
commit883238dc508e721db694277c5273a4c3e9a7132f (patch)
tree6e712772cc38ac0780a065e492afcf70345a165a
parentb290428d711f5a38073ed993a63e6bbf1e6af66d (diff)
downloaddevice-tree-compiler-883238dc508e721db694277c5273a4c3e9a7132f.tar.gz
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>
-rw-r--r--util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/util.c b/util.c
index 3055c16..e87d6c1 100644
--- a/util.c
+++ b/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 {