Skip to content
Commit 2886e4a0 authored by Pavel Labath's avatar Pavel Labath
Browse files

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

llvm-svn: 350809
parent b7871405
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment