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

Unified Diff: runtime/lib/array.cc

Issue 8437106: Fixes to co19 crashes: (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 9 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 | runtime/vm/cpu_ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/array.cc
===================================================================
--- runtime/lib/array.cc (revision 1171)
+++ runtime/lib/array.cc (working copy)
@@ -121,12 +121,12 @@
}
intptr_t isrc_start = src_start.Value();
intptr_t idst_start = dst_start.Value();
- if ((isrc_start + icount) > source.Length()) {
+ if ((isrc_start < 0) || ((isrc_start + icount) > source.Length())) {
GrowableArray<const Object*> arguments;
arguments.Add(&src_start);
Exceptions::ThrowByType(Exceptions::kIndexOutOfRange, arguments);
}
- if ((idst_start + icount) > dest.Length()) {
+ if ((idst_start < 0) || ((idst_start + icount) > dest.Length())) {
GrowableArray<const Object*> arguments;
arguments.Add(&dst_start);
Exceptions::ThrowByType(Exceptions::kIndexOutOfRange, arguments);
« no previous file with comments | « no previous file | runtime/vm/cpu_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698