commit | da62666f0a3841868e6cf96f0b8db3f011d63f4c | [log] [tgz] |
---|---|---|
author | Pierre-Clément Tosi <ptosi@google.com> | Fri Sep 23 12:41:48 2022 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Fri Sep 23 12:41:48 2022 +0000 |
tree | 5effe840586e5b8b95d232d487fe22883368c02d | |
parent | f38698893cc428babe61b8eba75bf1d5e92c440e [diff] | |
parent | ae2ece49eeacac7c89456ccc0c11d7a3047878eb [diff] |
[automerge] libfdt: fdt_path_offset_namelen: Reject empty paths 2p: a6ac6d916d 2p: c69e9730e6 am: 5b78ca8410 am: d3b59a5d3a am: ae2ece49ee Original change: https://googleplex-android-review.googlesource.com/c/platform/external/dtc/+/20024810 Change-Id: Ic1b793fa56e8c05230d29c8e8f316f738afcb686 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 9f6c551..e61df25 100644 --- a/libfdt/fdt_ro.c +++ b/libfdt/fdt_ro.c
@@ -255,6 +255,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);