Skip to content
Commit bfc4a4b7 authored by George Rimar's avatar George Rimar
Browse files

[ELF] - Fixed possible iterator overflow.

We can have Opt.Commands size greater then Sections.size().
For example if we have next script:

SECTIONS { 
.aaa : { *(.aaa) }           
.bbb : { *(.bbb) }   
.ccc : { *(.ccc) }   
}

and next code:

.global _start
_start:
 nop

.section .aaa,"a"
 .quad 0

Then amount of sections is less than amound of Opt.Commands
and if we for example have all commands NoConstraint,
that overflowed the iterator used.

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