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

Commit 98dd5d9a authored by Patrik Torstensson's avatar Patrik Torstensson
Browse files

SurfaceControl: Crash due to invalid JNI cast

The (void*)buffer.get on ARM32 is 4 byte, so the calling convention
will put the argument in [sp, #12]. However, the caller actually
expects a long (the signature of gGraphicBufferClassInfo.builder),
which means it will expect it to be in [sp, #16]

Test: Tested on mtk device
Fixes: 36631082
Change-Id: I0f723125e612d096c0d76ca3360d895f3f23f286
parent 8683062a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -167,7 +167,7 @@ static jobject nativeScreenshotToBuffer(JNIEnv* env, jclass clazz,
            buffer->getHeight(),
            buffer->getPixelFormat(),
            buffer->getUsage(),
            (void*)buffer.get());
            (jlong)buffer.get());
}

static jobject nativeScreenshotBitmap(JNIEnv* env, jclass clazz,