commit | d3b59a5d3af536dab4223679915c2402e23975ac | [log] [tgz] |
---|---|---|
author | Pierre-Clément Tosi <ptosi@google.com> | Fri Sep 23 11:33:13 2022 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Fri Sep 23 11:33:13 2022 +0000 |
tree | 05e348ff5e6d0c5be3ce3af495d501eee0a0ef56 | |
parent | 94792430ba94eda4067077e7c35f44f5ec4503da [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: If03db4f51e74c1166de322128c477218fac6a000 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 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);