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

Issue 11447009: - Do not read past the end of the utf32_array. (Closed)

Created:
8 years ago by Ivan Posva
Modified:
8 years ago
Reviewers:
siva
CC:
reviews_dartlang.org
Visibility:
Public.

Description

- Do not read past the end of the utf32_array. Committed: https://code.google.com/p/dart/source/detail?r=15847

Patch Set 1 #

Total comments: 2

Patch Set 2 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+24 lines, -6 lines) Patch
M runtime/vm/object.cc View 1 1 chunk +7 lines, -6 lines 0 comments Download
M runtime/vm/object_test.cc View 1 1 chunk +17 lines, -0 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
Ivan Posva
8 years ago (2012-12-05 10:50:11 UTC) #1
erikcorry
https://codereview.chromium.org/11447009/diff/1/runtime/vm/object.cc File runtime/vm/object.cc (right): https://codereview.chromium.org/11447009/diff/1/runtime/vm/object.cc#newcode9999 runtime/vm/object.cc:9999: while (it.Next() && (i < len)) { LGTM. Obvious ...
8 years ago (2012-12-05 10:54:06 UTC) #2
erikcorry
And please add regression test.
8 years ago (2012-12-05 10:55:09 UTC) #3
siva
lgtm
8 years ago (2012-12-06 00:02:32 UTC) #4
Ivan Posva
8 years ago (2012-12-07 17:18:06 UTC) #5
https://codereview.chromium.org/11447009/diff/1/runtime/vm/object.cc
File runtime/vm/object.cc (right):

https://codereview.chromium.org/11447009/diff/1/runtime/vm/object.cc#newcode9999
runtime/vm/object.cc:9999: while (it.Next() && (i < len)) {
On 2012/12/05 10:54:06, erikcorry wrote:
> LGTM.
> 
> Obvious optimization:  If len > this.length() then return false, and if len <
> this.length() / 2 then you can also return false.

Different CL.

Powered by Google App Engine
This is Rietveld 408576698