commit | c69e9730e658eda4f30f910c49cc073e89238e2f | [log] [tgz] |
---|---|---|
author | Pierre-Clément Tosi <ptosi@google.com> | Fri Sep 23 08:10:00 2022 +0000 |
committer | Presubmit Automerger Backend <android-build-presubmit-automerger-backend@system.gserviceaccount.com> | Fri Sep 23 08:10:00 2022 +0000 |
tree | 4e184f0460d3161448af0e439c9b2945836c7fd8 | |
parent | ca907770de39e6fb3a48fe6e36c9ece952dd7fef [diff] | |
parent | a6ac6d916df145366bcb34f5507d5da213b2ebaf [diff] |
[automerge] libfdt: fdt_path_offset_namelen: Reject empty paths 2p: a6ac6d916d Original change: https://googleplex-android-review.googlesource.com/c/platform/external/dtc/+/20024810 Bug: 246465319 Change-Id: I0ca57afacace494e41bb33cde3181437662e3547
diff --git a/libfdt/fdt_ro.c b/libfdt/fdt_ro.c index e03570a..7a65dfe 100644 --- a/libfdt/fdt_ro.c +++ b/libfdt/fdt_ro.c
@@ -253,6 +253,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);