Commit da72a317 authored by vogelheim's avatar vogelheim Committed by Commit bot

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}
parent 2661b3e8
...@@ -175,7 +175,7 @@ SourcePositionTableIterator::SourcePositionTableIterator(ByteArray* byte_array) ...@@ -175,7 +175,7 @@ SourcePositionTableIterator::SourcePositionTableIterator(ByteArray* byte_array)
void SourcePositionTableIterator::Advance() { void SourcePositionTableIterator::Advance() {
DCHECK(!done()); DCHECK(!done());
DCHECK(index_ >= 0 && index_ <= table_->length()); DCHECK(index_ >= 0 && index_ <= table_->length());
if (index_ == table_->length()) { if (index_ >= table_->length()) {
index_ = kDone; index_ = kDone;
} else { } else {
PositionTableEntry tmp; PositionTableEntry tmp;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment