From da72a3176fba32b39049d070fbd2d789bbbfe8b6 Mon Sep 17 00:00:00 2001 From: vogelheim Date: Wed, 23 Nov 2016 05:48:31 -0800 Subject: [PATCH] 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} --- src/source-position-table.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/source-position-table.cc b/src/source-position-table.cc index 845081b711..35d8e7c2f6 100644 --- a/src/source-position-table.cc +++ b/src/source-position-table.cc @@ -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;