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:
parent
2661b3e8a5
commit
da72a3176f
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user