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

Side by Side Diff: runtime/vm/object.cc

Issue 949343002: Fix array-out-of-bounds in TypedDataView::ElementSizeInBytes. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« runtime/vm/object.h ('K') | « runtime/vm/object.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/object.h" 5 #include "vm/object.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/assembler.h" 9 #include "vm/assembler.h"
10 #include "vm/cpu.h" 10 #include "vm/cpu.h"
(...skipping 19796 matching lines...) Expand 10 before | Expand all | Expand 10 after
19807 OS::SNPrint(chars, len, kFormat, _x, _y); 19807 OS::SNPrint(chars, len, kFormat, _x, _y);
19808 return chars; 19808 return chars;
19809 } 19809 }
19810 19810
19811 19811
19812 void Float64x2::PrintJSONImpl(JSONStream* stream, bool ref) const { 19812 void Float64x2::PrintJSONImpl(JSONStream* stream, bool ref) const {
19813 Instance::PrintJSONImpl(stream, ref); 19813 Instance::PrintJSONImpl(stream, ref);
19814 } 19814 }
19815 19815
19816 19816
19817 const intptr_t TypedData::element_size[] = { 19817 const intptr_t TypedData::element_size_table[TypedData::kNumElementSizes] = {
19818 1, // kTypedDataInt8ArrayCid. 19818 1, // kTypedDataInt8ArrayCid.
19819 1, // kTypedDataUint8ArrayCid. 19819 1, // kTypedDataUint8ArrayCid.
19820 1, // kTypedDataUint8ClampedArrayCid. 19820 1, // kTypedDataUint8ClampedArrayCid.
19821 2, // kTypedDataInt16ArrayCid. 19821 2, // kTypedDataInt16ArrayCid.
19822 2, // kTypedDataUint16ArrayCid. 19822 2, // kTypedDataUint16ArrayCid.
19823 4, // kTypedDataInt32ArrayCid. 19823 4, // kTypedDataInt32ArrayCid.
19824 4, // kTypedDataUint32ArrayCid. 19824 4, // kTypedDataUint32ArrayCid.
19825 8, // kTypedDataInt64ArrayCid. 19825 8, // kTypedDataInt64ArrayCid.
19826 8, // kTypedDataUint64ArrayCid. 19826 8, // kTypedDataUint64ArrayCid.
19827 4, // kTypedDataFloat32ArrayCid. 19827 4, // kTypedDataFloat32ArrayCid.
(...skipping 851 matching lines...) Expand 10 before | Expand all | Expand 10 after
20679 return tag_label.ToCString(); 20679 return tag_label.ToCString();
20680 } 20680 }
20681 20681
20682 20682
20683 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { 20683 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const {
20684 Instance::PrintJSONImpl(stream, ref); 20684 Instance::PrintJSONImpl(stream, ref);
20685 } 20685 }
20686 20686
20687 20687
20688 } // namespace dart 20688 } // namespace dart
OLDNEW
« runtime/vm/object.h ('K') | « runtime/vm/object.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698