commit | 5610d3a7ded98a2434b7bf7b66c53a278d7b0f58 | [log] [tgz] |
---|---|---|
author | Pierre-Clément Tosi <ptosi@google.com> | Mon Sep 26 14:42:00 2022 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Mon Sep 26 14:42:00 2022 +0000 |
tree | ca2d1319e853751b522976eaaaae7a46a41ce3f2 | |
parent | 63fbc9240017bc5cbc8db433c36650fb8b172f8d [diff] | |
parent | daba1986c0ad1adc5bb826df3e2aef8de175b2f6 [diff] |
libfdt: fdt_path_offset_namelen: Reject empty paths am: d10c84c4bc am: 9f4834b735 am: e0440b0907 am: 13d00fad64 am: 7799b9fb26 am: 98ab028002 am: 0a053dfe49 am: 1716041baa am: daba1986c0 Original change: https://googleplex-android-review.googlesource.com/c/platform/external/dtc/+/20024811 Change-Id: Id4bdb7dbb7bc04d4459313fdcda2fb9bec80ff6f 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 e61df25..87d736b 100644 --- a/libfdt/fdt_ro.c +++ b/libfdt/fdt_ro.c
@@ -258,6 +258,9 @@ if (namelen < 1) return -FDT_ERR_BADPATH; + if (namelen < 1) + return -FDT_ERR_BADPATH; + /* see if we have an alias */ if (*path != '/') { const char *q = memchr(path, '/', end - p);