HomePhabricator

[llvm-dwp] Fix a possible out of bound access.

Authored by ikudrin on Mar 20 2020, 9:10 AM.

Description

[llvm-dwp] Fix a possible out of bound access.

llvm-dwp did not check section identifiers read from input files.
In the case of an unexpected identifier, the calculated index for
Contributions[] pointed outside the array. This fix avoids the issue
by skipping unsupported identifiers.

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

Details