From: yangguo@chromium.org Date: Tue, 25 Sep 2012 16:59:27 +0000 (+0000) Subject: Fix off-by-one error introduced in r12598. X-Git-Tag: upstream/4.7.83~15940 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0f37cb0b794538074311527258570253f097f8b1;p=platform%2Fupstream%2Fv8.git 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 --- diff --git a/src/json-parser.h b/src/json-parser.h index ad01726..21c3623 100644 --- a/src/json-parser.h +++ b/src/json-parser.h @@ -580,7 +580,7 @@ Handle JsonParser::ScanJsonString() { if (c0_ < 0x20) return Handle::null(); running_hash = StringHasher::AddCharacterCore(running_hash, c0); position++; - if (position > source_length_) return Handle::null(); + if (position >= source_length_) return Handle::null(); c0 = seq_source_->SeqAsciiStringGet(position); } while (c0 != '"'); int length = position - position_;