libfdt: fdt_path_offset_namelen: Reject empty paths am: d10c84c4bc am: 9f4834b735 am: e0440b0907 am: 13d00fad64 am: 7799b9fb26

Original change: https://googleplex-android-review.googlesource.com/c/platform/external/dtc/+/20024811

Change-Id: I77a489de206e6238ac7b5dee2f2edf33d132cdc1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Pierre-Clément Tosi 2022-09-26 11:04:58 +00:00 committed by Automerger Merge Worker
commit 1c1c6e8948

View file

@ -253,6 +253,9 @@ int fdt_path_offset_namelen(const void *fdt, const char *path, int namelen)
FDT_RO_PROBE(fdt);
if (namelen < 1)
return -FDT_ERR_BADPATH;
if (namelen < 1)
return -FDT_ERR_BADPATH;