OSDN Git Service

Fix typo in checkTwoLevelHintsCommand
authorJessica Paquette <jpaquette@apple.com>
Tue, 17 Oct 2017 20:43:33 +0000 (20:43 +0000)
committerJessica Paquette <jpaquette@apple.com>
Tue, 17 Oct 2017 20:43:33 +0000 (20:43 +0000)
BigSize had a copy/paste typo in it. This fixes that.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@316027 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Object/MachOObjectFile.cpp

index 7b4be97..8ac9691 100644 (file)
@@ -1115,7 +1115,7 @@ static Error checkTwoLevelHintsCommand(const MachOObjectFile &Obj,
                           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 "