[PATCH] D95554: [BitcodeReader] Validate Strtab before accessing.

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 29 07:47:58 PST 2021


arsenm added inline comments.


================
Comment at: llvm/lib/Bitcode/Reader/BitcodeReader.cpp:3377-3378
 
-  // Check whether we have enough values to read a partition name.
-  if (Record.size() > 18)
+  // Check whether we have enough values to read a partition name. Also make
+  // Strtab has some data.
+  if (Record.size() > 18 && Strtab.data() &&
----------------
I think you missed the word sure


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D95554/new/

https://reviews.llvm.org/D95554



More information about the llvm-commits mailing list