HomePhabricator

PECOFF: Fix section name computation

Description

PECOFF: Fix section name computation

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.

Reviewers: zturner, stella.stamenova

Subscribers: lldb-commits

Differential Revision: https://reviews.llvm.org/D56124

Details

Committed
labathJan 10 2019, 2:23 AM
Differential Revision
D56124: PECOFF: Fix section name computation
Branches
Unknown
Tags
Unknown