Check for null-termination of fixups in ufdt overlay

libufdt expects fixups in overlay tree to be null-terminated. This
condition was not checked which could lead to strlen() accessing the
memory out of bounds when overlay fdt is in incorrect format and
contains fixups that are not null-terminated.
This change adds a check that fixups paths are null-terminated in the
overlay tree.

Fixes: b/379848664
Test: builds
Test: libufdt tests pass locally
Test: libufdt fuzzer passes for corpus specified in the bug
Change-Id: I3d12253c45b27b6cfe170439cad94635e77b584b
1 file changed