[libcxx-commits] [PATCH] D77679: [libunwind] Fix UB in EHHeaderParser::findFDE

Jorge Gorbe Moya via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Apr 7 15:17:25 PDT 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rG82576d6fecfe: [libunwind] Fix UB in EHHeaderParser::findFDE (authored by jgorbe).
Herald added projects: LLVM, libunwind.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libunwind.

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D77679

Files:
  libunwind/src/EHHeaderParser.hpp


Index: libunwind/src/EHHeaderParser.hpp
===================================================================
--- libunwind/src/EHHeaderParser.hpp
+++ libunwind/src/EHHeaderParser.hpp
@@ -109,6 +109,8 @@
                                       hdrInfo))
     return false;
 
+  if (hdrInfo.fde_count == 0) return false;
+
   size_t tableEntrySize = getTableEntrySize(hdrInfo.table_enc);
   pint_t tableEntry;
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D77679.255832.patch
Type: text/x-patch
Size: 408 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20200407/911613e8/attachment.bin>


More information about the libcxx-commits mailing list