Fix off-by-one error introduced in r12598.

R=verwaest@chromium.org
BUG=

Review URL: https://chromiumcodereview.appspot.com/10977009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12606 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
yangguo@chromium.org 2012-09-25 16:59:27 +00:00
parent c467b2659f
commit 0f37cb0b79

View File

@ -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_;