commit | a67a4aa8d00fdc829fb6da32d53b1d918c2a97f1 | [log] [tgz] |
---|---|---|
author | Pierre-Clément Tosi <ptosi@google.com> | Fri Sep 23 11:30:21 2022 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Fri Sep 23 11:30:21 2022 +0000 |
tree | 5effe840586e5b8b95d232d487fe22883368c02d | |
parent | 2b3ff5c1b69580d1aabdd98455df4362f19ef653 [diff] | |
parent | 5b78ca841071fee81479036462e7e048fefacb26 [diff] |
[automerge] libfdt: fdt_path_offset_namelen: Reject empty paths 2p: a6ac6d916d 2p: c69e9730e6 am: 5b78ca8410 Original change: https://googleplex-android-review.googlesource.com/c/platform/external/dtc/+/20024810 Change-Id: I29a121003addfe5db9fd8d24a7f05eaa0403b06e Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/libfdt/fdt_ro.c b/libfdt/fdt_ro.c index 9f6c551..e61df25 100644 --- a/libfdt/fdt_ro.c +++ b/libfdt/fdt_ro.c
@@ -255,6 +255,9 @@ FDT_RO_PROBE(fdt); + if (namelen < 1) + return -FDT_ERR_BADPATH; + /* see if we have an alias */ if (*path != '/') { const char *q = memchr(path, '/', end - p);