[Lldb-commits] [PATCH] D56124: PECOFF: Fix section name computation

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Dec 28 02:32:34 PST 2018


labath created this revision.
labath added reviewers: zturner, stella.stamenova.
Herald added a subscriber: abidh.

  If a section name is exactly 8 bytes long (or has been truncated to 8
  bytes), it will not contain the terminating nul character. This means
  reading the name as a c string will pick up random data following the
  name field (which happens to be the section vm size).
  
  This fixes the name computation to avoid out-of-bounds access and adds a
  test.


Repository:
  rLLDB LLDB

https://reviews.llvm.org/D56124

Files:
  lit/Modules/PECOFF/sections-names.yaml
  source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
  source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56124.179615.patch
Type: text/x-patch
Size: 5082 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20181228/8dc2cb11/attachment.bin>


More information about the lldb-commits mailing list