diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2022-10-27 08:11:24 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2022-10-27 08:11:24 +0000 |
commit | 81dc9c928d3a359fe76ab8fc938c969be4a3f2c5 (patch) | |
tree | f29df083681388501085cc17375322d8888d1bf6 | |
parent | 62478b1251569142d1758c7f2275d40def7cf0f5 (diff) | |
parent | 21007bde51f0f050fa6ebaa9476346857b79e9e4 (diff) | |
download | dtc-aml_tet_331412030.tar.gz |
Snap for 9224945 from 21007bde51f0f050fa6ebaa9476346857b79e9e4 to mainline-tethering-releaseaml_tet_331910040aml_tet_331820050aml_tet_331711040aml_tet_331511160aml_tet_331511000aml_tet_331412030aml_tet_331312080android13-mainline-tethering-release
Change-Id: I8379568827354d28e0d6cfb39b258bbf3514218b
-rw-r--r-- | libfdt/fdt_ro.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libfdt/fdt_ro.c b/libfdt/fdt_ro.c index e03570a..67fb218 100644 --- a/libfdt/fdt_ro.c +++ b/libfdt/fdt_ro.c @@ -253,6 +253,12 @@ int fdt_path_offset_namelen(const void *fdt, const char *path, int namelen) FDT_RO_PROBE(fdt); + 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); |