Go to file
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
tests libfdt: Fix bounds-checking bug in fdt_get_property() 2006-12-14 15:29:25 +11:00
.gitignore libfdt - library for manipulating device trees in flattened format 2006-11-27 16:21:28 +11:00
GPL Add a copy of the GPL 2006-11-29 16:49:27 +11:00
Makefile libfdt: Read-write support 2006-12-01 16:59:43 +11:00
fdt.c libfdt: Introduce flat tree format v17 2006-12-01 16:25:39 +11:00
fdt.h libfdt: Introduce flat tree format v17 2006-12-01 16:25:39 +11:00
fdt_ro.c libfdt: Fix bounds-checking bug in fdt_get_property() 2006-12-14 15:29:25 +11:00
fdt_rw.c libfdt: Abolish fdt_property_offset() 2006-12-11 16:15:34 +11:00
fdt_sw.c libfdt: Introduce flat tree format v17 2006-12-01 16:25:39 +11:00
fdt_wip.c libfdt: Abolish fdt_property_offset() 2006-12-11 16:15:34 +11:00
libfdt.h libfdt: Abolish fdt_property_offset() 2006-12-11 16:15:34 +11:00
libfdt_env.h libfdt: Export accessors for header fields 2006-12-01 15:02:10 +11:00
libfdt_internal.h libfdt: Remove unused _ptr_offset() function 2006-12-12 12:48:15 +11:00