Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(122)

Unified Diff: src/source-position-table.cc

Issue 2525663003: Prevent read-after-buffer in SourcePositionTableIterator::Advance. (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/source-position-table.cc
diff --git a/src/source-position-table.cc b/src/source-position-table.cc
index 845081b711163e472e96dd24f50aaaf1e6f69344..35d8e7c2f6806fbf00ae7e934e354c982c35bb82 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;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698