mirror of
https://github.com/JetBrains/JetBrainsRuntime.git
synced 2025-12-06 09:29:38 +01:00
JBR-6884 SIGSEGV in Java_sun_java2d_wl_WLSMSurfaceData_pixelsAt
This commit is contained in:
committed by
Maxim Kartashёv
parent
a946a753c2
commit
75a7617dd3
@@ -176,6 +176,11 @@ Java_sun_java2d_wl_WLSMSurfaceData_pixelsAt(JNIEnv *env, jobject wsd, jint x, ji
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (rasInfo.bounds.x2 - rasInfo.bounds.x1 < width || rasInfo.bounds.y2 - rasInfo.bounds.y1 < height) {
|
||||
JNU_ThrowByName(env, "java/lang/ArrayIndexOutOfBoundsException", "Surface too small");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
jintArray arrayObj = NULL;
|
||||
ops->GetRasInfo(env, ops, &rasInfo);
|
||||
if (rasInfo.rasBase && rasInfo.pixelStride == sizeof(jint)) {
|
||||
|
||||
Reference in New Issue
Block a user