dtc/tests
David Gibson 9825f823eb libfdt: Fix bounds-checking bug in fdt_get_property()
The libfdt functions are supposed to behave tolerably well when practical,
even if given a corrupted device tree as input.  A silly mistake in
fdt_get_property() means we're bounds checking against the size of a pointer
instead of the size of a property header, meaning we can get bogus
behaviour in a corrupted device tree where the structure block ends in
what's supposed to be the middle of a property.

This patch corrects the problem (fdt_get_property() will now return
BADSTRUCTURE in this case), and also adds a testcase to catch the bug.
2006-12-14 15:29:25 +11:00
..
.gitignore libfdt: Add dtb files to .gitignore 2006-12-04 11:17:32 +11:00
Makefile libfdt: Fix bounds-checking bug in fdt_get_property() 2006-12-14 15:29:25 +11:00
del_node.c libfdt: Read-write support 2006-12-01 16:59:43 +11:00
del_property.c libfdt: Read-write support 2006-12-01 16:59:43 +11:00
dumptrees.c libfdt: Export accessors for header fields 2006-12-01 15:02:10 +11:00
find_property.c libfdt: Abolish fdt_property_offset() 2006-12-11 16:15:34 +11:00
getprop.c Have tests read example tree from a generated file, rather than link it in. 2006-11-28 17:20:01 +11:00
move_and_save.c libfdt: Implement fdt_move() 2006-12-01 15:07:19 +11:00
nop_node.c Have tests read example tree from a generated file, rather than link it in. 2006-11-28 17:20:01 +11:00
nop_property.c libfdt: Fix logic in nop_property testcase 2006-12-01 13:10:07 +11:00
notfound.c libfdt: Abolish fdt_property_offset() 2006-12-11 16:15:34 +11:00
open_pack.c libfdt: Read-write support 2006-12-01 16:59:43 +11:00
path_offset.c Have tests read example tree from a generated file, rather than link it in. 2006-11-28 17:20:01 +11:00
root_node.c libfdt: Fix libfdt for little endian hosts 2006-12-04 12:52:45 +11:00
run_tests.sh libfdt: Fix bounds-checking bug in fdt_get_property() 2006-12-14 15:29:25 +11:00
rw_tree1.c libfdt: Read-write support 2006-12-01 16:59:43 +11:00
setprop.c libfdt: Read-write support 2006-12-01 16:59:43 +11:00
setprop_inplace.c Have tests read example tree from a generated file, rather than link it in. 2006-11-28 17:20:01 +11:00
subnode_offset.c Have tests read example tree from a generated file, rather than link it in. 2006-11-28 17:20:01 +11:00
sw_tree1.c libfdt: Sequential write support 2006-11-29 16:45:46 +11:00
testdata.h libfdt: Fix bounds-checking bug in fdt_get_property() 2006-12-14 15:29:25 +11:00
tests.h libfdt: Read-write support 2006-12-01 16:59:43 +11:00
testutils.c libfdt: Abolish fdt_property_offset() 2006-12-11 16:15:34 +11:00
trees.S libfdt: Fix bounds-checking bug in fdt_get_property() 2006-12-14 15:29:25 +11:00
truncated_property.c libfdt: Fix bounds-checking bug in fdt_get_property() 2006-12-14 15:29:25 +11:00