[PATCH] D97239: [profile] Fix buffer overrun when parsing %c in filename string
Vedant Kumar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 24 14:49:35 PST 2021
vsk added inline comments.
================
Comment at: compiler-rt/lib/profile/InstrProfilingFile.c:707
+ assert(Idx <= Strlen && "Indexing past string null terminator");
+ return Idx <= Strlen;
+}
----------------
kastiglione wrote:
> oh shouldn't these be `Idx < Strlen`?
Followed up offline but to recap: no, we dereference the null byte at the end.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97239/new/
https://reviews.llvm.org/D97239
More information about the llvm-commits
mailing list