[PATCH] D139315: [NFC][LLVM-MT] Fix buffer-overflow when comparing buffers
Alex Brachet via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 5 14:03:12 PST 2022
abrachet added inline comments.
================
Comment at: llvm/tools/llvm-mt/llvm-mt.cpp:153-157
+ bool SameSize =
+ OutputBuffer->getBufferSize() == FileBuffer->getBufferSize();
+ Same = SameSize && std::equal(OutputBuffer->getBufferStart(),
+ OutputBuffer->getBufferEnd(),
+ FileBuffer->getBufferStart());
----------------
That should work too. WDYT?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D139315/new/
https://reviews.llvm.org/D139315
More information about the llvm-commits
mailing list