commit | daba1986c0ad1adc5bb826df3e2aef8de175b2f6 | [log] [tgz] |
---|---|---|
author | Pierre-Clément Tosi <ptosi@google.com> | Mon Sep 26 13:50:42 2022 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Mon Sep 26 13:50:42 2022 +0000 |
tree | ae287821bc23143d7af4658b7b4fccd7bf0ff109 | |
parent | d0cba49182ddbce8f8cbfa3d532fbd2b4d5befba [diff] | |
parent | 1716041baa137e93e83c47c3916d2808e702ced8 [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 Original change: https://googleplex-android-review.googlesource.com/c/platform/external/dtc/+/20024811 Change-Id: I37c1127c7b10f1152a5dbfe0155f7a4c36b9d5e5 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);