[PATCH] D40121: [scudo] Make getNumberOfCPUs Fuchsia compliant v2
Kostya Kortchinsky via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 16 09:33:59 PST 2017
cryptoad added inline comments.
================
Comment at: lib/sanitizer_common/sanitizer_linux_libcdep.cc:591
+ d_type = (u8 *)entry + entry->d_reclen - 1;
+ if (entry->d_ino != 0 && *d_type == DT_DIR) {
+ if (entry->d_name[0] == 'c' && entry->d_name[1] == 'p' &&
----------------
Add a `d_reclen` check to avoid a OOB read on `d_name`.
Repository:
rL LLVM
https://reviews.llvm.org/D40121
More information about the llvm-commits
mailing list