[Crosstoolchain-logs] [device-tree-compiler] 26/57: fdtdump: Fix over-zealous version check
Vagrant Cascadian
vagrant at moszumanska.debian.org
Thu Sep 28 22:03:58 UTC 2017
This is an automated email from the git hooks/post-receive script.
vagrant pushed a commit to branch upstream/latest
in repository device-tree-compiler.
commit c2258841a785742a3fd5c423f4965caac73d01af
Author: David Gibson <david at gibson.dropbear.id.au>
Date: Tue Apr 18 12:52:08 2017 +1000
fdtdump: Fix over-zealous version check
It's perfectly valid for a dtb to have version and last compat version set
to the same value, and that value can be 17 (the latest defined version).
However, since 0931cea "dtc: fdtdump: check fdt if not in scanning mode"
fdtdump will refuse to process such a dtb. We get away with this in many
cases because dtc's typical output has last compat version equal to 16,
rather than 17, but it's still a bug.
Signed-off-by: David Gibson <david at gibson.dropbear.id.au>
---
fdtdump.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fdtdump.c b/fdtdump.c
index 4eaade9..f199bc5 100644
--- a/fdtdump.c
+++ b/fdtdump.c
@@ -165,7 +165,7 @@ static bool valid_header(char *p, off_t len)
if (len < sizeof(struct fdt_header) ||
fdt_magic(p) != FDT_MAGIC ||
fdt_version(p) > MAX_VERSION ||
- fdt_last_comp_version(p) >= MAX_VERSION ||
+ fdt_last_comp_version(p) > MAX_VERSION ||
fdt_totalsize(p) >= len ||
fdt_off_dt_struct(p) >= len ||
fdt_off_dt_strings(p) >= len)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/crosstoolchain/device-tree-compiler.git
More information about the Crosstoolchain-logs
mailing list