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

Unified Diff: src/json-parser.h

Issue 10977009: Fix off-by-one error introduced in r12598. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 3 months 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/json-parser.h
diff --git a/src/json-parser.h b/src/json-parser.h
index ad01726415d3b47543160c521f695c2498560b0e..21c3623ef88fc5d0058c4ffdf32fcfeaa580c9cc 100644
--- a/src/json-parser.h
+++ b/src/json-parser.h
@@ -580,7 +580,7 @@ Handle<String> JsonParser<seq_ascii>::ScanJsonString() {
if (c0_ < 0x20) return Handle<String>::null();
running_hash = StringHasher::AddCharacterCore(running_hash, c0);
position++;
- if (position > source_length_) return Handle<String>::null();
+ if (position >= source_length_) return Handle<String>::null();
c0 = seq_source_->SeqAsciiStringGet(position);
} while (c0 != '"');
int length = position - position_;
« 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