[PATCH] D128117: [ObjCopy] Fix type mismatch in writeCodeSignatureData()

Daniel Rodríguez Troitiño via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 24 09:26:20 PDT 2022


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG146f486ba337: [ObjCopy] Fix type mismatch in writeCodeSignatureData() (authored by jmroot, committed by drodriguez).

Repository:
  rG LLVM Github Monorepo

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.439799.patch
Type: text/x-patch
Size: 828 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220624/121a71f7/attachment.bin>


More information about the llvm-commits mailing list