[PATCH] D128117: [ObjCopy] Fix type mismatch in writeCodeSignatureData()
Joshua Root via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 20 18:46:16 PDT 2022
jmroot updated this revision to Diff 438524.
jmroot added a comment.
Now using size_t for the two casts, since that is what the StringRef constructor actually takes.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D128117/new/
https://reviews.llvm.org/D128117
Files:
llvm/lib/ObjCopy/MachO/MachOWriter.cpp
Index: llvm/lib/ObjCopy/MachO/MachOWriter.cpp
===================================================================
--- llvm/lib/ObjCopy/MachO/MachOWriter.cpp
+++ llvm/lib/ObjCopy/MachO/MachOWriter.cpp
@@ -520,8 +520,9 @@
uint8_t *CurrHashWritePosition = HashWriteStart;
while (CurrHashReadPosition < HashReadEnd) {
StringRef Block(reinterpret_cast<char *>(CurrHashReadPosition),
- std::min(HashReadEnd - CurrHashReadPosition,
- static_cast<ssize_t>(CodeSignature.BlockSize)));
+ std::min(static_cast<size_t>(HashReadEnd
+ - CurrHashReadPosition),
+ static_cast<size_t>(CodeSignature.BlockSize)));
SHA256 Hasher;
Hasher.update(Block);
std::array<uint8_t, 32> Hash = Hasher.final();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D128117.438524.patch
Type: text/x-patch
Size: 828 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220621/623d758a/attachment.bin>
More information about the llvm-commits
mailing list