Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c360bef7 authored by John Reck's avatar John Reck
Browse files

Fix ATLAS_MAP_ENTRY_FIELD_COUNT

Bug: 22558805

Change a039182d 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
parent 1aadfc2b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -93,7 +93,7 @@ public class AssetAtlasService extends IAssetAtlas.Stub {
    // Defines the number of int fields used to represent a single entry
    // in the atlas map. This number defines the size of the array returned
    // by the getMap(). See the mAtlasMap field for more information
    private static final int ATLAS_MAP_ENTRY_FIELD_COUNT = 4;
    private static final int ATLAS_MAP_ENTRY_FIELD_COUNT = 3;

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