[PATCH] D28502: [compiler-rt] [Interception] Properly check for export table's size before referring to its elements.

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 9 16:55:56 PST 2017


rnk accepted this revision.
rnk added a comment.
This revision is now accepted and ready to land.

Feel free to commit if you like the suggestion.



================
Comment at: lib/interception/interception_win.cc:881
       &headers->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_EXPORT];
+  if (!(export_directory->Size))
+    return 0;
----------------
It's probably more readable to do `== 0` since Size is a number, not a pointer.


Repository:
  rL LLVM

https://reviews.llvm.org/D28502





More information about the llvm-commits mailing list