[llvm] r316027 - Fix typo in checkTwoLevelHintsCommand

Jessica Paquette via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 17 13:43:33 PDT 2017


Author: paquette
Date: Tue Oct 17 13:43:33 2017
New Revision: 316027

URL: http://llvm.org/viewvc/llvm-project?rev=316027&view=rev
Log:
Fix typo in checkTwoLevelHintsCommand

BigSize had a copy/paste typo in it. This fixes that.


Modified:
    llvm/trunk/lib/Object/MachOObjectFile.cpp

Modified: llvm/trunk/lib/Object/MachOObjectFile.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Object/MachOObjectFile.cpp?rev=316027&r1=316026&r2=316027&view=diff
==============================================================================
--- llvm/trunk/lib/Object/MachOObjectFile.cpp (original)
+++ llvm/trunk/lib/Object/MachOObjectFile.cpp Tue Oct 17 13:43:33 2017
@@ -1115,7 +1115,7 @@ static Error checkTwoLevelHintsCommand(c
                           Twine(LoadCommandIndex) + " extends past the end of "
                           "the file");
   uint64_t BigSize = Hints.nhints;
-  BigSize *= Hints.nhints * sizeof(MachO::twolevel_hint);
+  BigSize *= sizeof(MachO::twolevel_hint);
   BigSize += Hints.offset;
   if (BigSize > FileSize)
     return malformedError("offset field plus nhints times sizeof(struct "




More information about the llvm-commits mailing list