libfdt: fdt_path_offset_namelen: Reject empty paths

Make empty paths result in FDT_ERR_BADPATH.

Per the specification (v0.4-rc4):

> The convention for specifying a device path is:
>     /node-name-1/node-name-2/node-name-N
>
> The path to the root node is /.
>
> A unit address may be omitted if the full path to the
> node is unambiguous.

Bug: 246465319
Test: libfdt_fuzzer  # clusterfuzz/testcase-detail/4530863420604416
Change-Id: I14ab0a074ab994c1f598243d2d5795d2cd9a853a
(cherry picked from commit 3c28f3e3a1724c288d19f1b1a139cf57bfe1af33)
1 file changed