dtc/tests/.gitignore
David Gibson 47d7c01ba8
Some checks failed
Build test / build-make (alpine) (push) Has been cancelled
Build test / build-make (archlinux) (push) Has been cancelled
Build test / build-make (fedora) (push) Has been cancelled
Build test / build-make (ubuntu) (push) Has been cancelled
Build test / build-meson (alpine) (push) Has been cancelled
Build test / build-meson (archlinux) (push) Has been cancelled
Build test / build-meson (fedora) (push) Has been cancelled
Build test / build-meson (ubuntu) (push) Has been cancelled
Build test / clang64 (push) Has been cancelled
Build test / mingw32 (push) Has been cancelled
Build test / mingw64 (push) Has been cancelled
Build test / ucrt64 (push) Has been cancelled
libfdt: Fix bugs with unchecked usage of fdt_num_mem_rsv()
fdt_num_mem_rsv() can return an error if the memory reservation block
is not properly terminated with a (0, 0) entry.  However several other
places in libfdt called it without checking for error returns, and could
therefore return strange results, or in the case of fdt_open_into()
crash.

Fix this by always checking the return value.  Add some addition tests to
catch this bug.

Reported-by: Moshe Strauss <moshestrauss10@gmail.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2026-04-17 21:21:16 +10:00

78 lines
1.1 KiB
Text

*.dtb
*.dts.test.s
*.test.dts
*.test.dt.yaml
tmp.*
/fs/
/add_subnode_with_nops
/addr_size_cells
/addr_size_cells2
/appendprop[12]
/appendprop_addrrange
/asm_tree_dump
/boot-cpuid
/char_literal
/check_full
/check_header
/check_path
/del_node
/del_property
/dtbs_equal_ordered
/dtbs_equal_unordered
/dtb_reverse
/dumptrees
/extra-terminating-null
/find_property
/get_alias
/get_mem_rsv
/get_name
/get_path
/get_phandle
/getprop
/get_prop_offset
/incbin
/integer-expressions
/fs_tree1
/mangle-layout
/move_and_save
/node_check_compatible
/node_offset_by_compatible
/node_offset_by_phandle
/node_offset_by_prop_value
/nop_node
/nop_property
/nopulate
/notfound
/open_pack
/overlay
/overlay_bad_fixup
/parent_offset
/path-references
/path_offset
/path_offset_aliases
/phandle_format
/property_iterate
/propname_escapes
/references
/relref_merge
/root_node
/rw_tree1
/rw_oom
/set_name
/setprop
/setprop_inplace
/sized_cells
/string_escapes
/stringlist
/subnode_iterate
/subnode_offset
/supernode_atdepth_offset
/sw_tree1
/sw_states
/truncated_property
/truncated_string
/truncated_memrsv
/unterminated_memrsv
/utilfdt_test
/value-labels
/get_next_tag_invalid_prop_len