Skip to content

Commit c360bef

Browse files
committed
Fix ATLAS_MAP_ENTRY_FIELD_COUNT
Bug: 22558805 Change a039182 reduced the size of an entry from 4 fields to 3, but failed to update the constant that determined the size of the java long[]. Because the long[] is blindly passed down through to native, this will result in reading past the end of the array as the size is no longer a multiple of the number of fields being read so the loop will not terminate until 1 iteration past the end. Change-Id: I2f8e26cec9a60b3a74739a3763203296be5f1fd6
1 parent 1aadfc2 commit c360bef

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

services/core/java/com/android/server/AssetAtlasService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public class AssetAtlasService extends IAssetAtlas.Stub {
9393
// Defines the number of int fields used to represent a single entry
9494
// in the atlas map. This number defines the size of the array returned
9595
// by the getMap(). See the mAtlasMap field for more information
96-
private static final int ATLAS_MAP_ENTRY_FIELD_COUNT = 4;
96+
private static final int ATLAS_MAP_ENTRY_FIELD_COUNT = 3;
9797

9898
// Specifies how our GraphicBuffer will be used. To get proper swizzling
9999
// the buffer will be written to using OpenGL (from JNI) so we can leave

0 commit comments

Comments
 (0)