Prevent read-after-buffer in SourcePositionTableIterator::Advance.

R=yangguo@chromium.org
BUG=chromium:667142

Review-Url: https://codereview.chromium.org/2525663003
Cr-Commit-Position: refs/heads/master@{#41224}
This commit is contained in:
vogelheim 2016-11-23 05:48:31 -08:00 committed by Commit bot
parent 2661b3e8a5
commit da72a3176f

View File

@ -175,7 +175,7 @@ SourcePositionTableIterator::SourcePositionTableIterator(ByteArray* byte_array)
void SourcePositionTableIterator::Advance() {
DCHECK(!done());
DCHECK(index_ >= 0 && index_ <= table_->length());
if (index_ == table_->length()) {
if (index_ >= table_->length()) {
index_ = kDone;
} else {
PositionTableEntry tmp;