From 0427b4f8979e87ab74a1395c48e3c0e0f5a4fb33 Mon Sep 17 00:00:00 2001 From: vadim Date: Tue, 3 Nov 2015 20:16:40 +0300 Subject: [PATCH] 8141213: [Parfait]Potentially blocking function GetArrayLength called in JNI critical region at line 239 of jdk/src/share/native/sun/awt/image/jpeg/jpegdecoder.c in function GET_ARRAYS Reviewed-by: prr, serb --- src/share/native/sun/awt/image/jpeg/jpegdecoder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/share/native/sun/awt/image/jpeg/jpegdecoder.c b/src/share/native/sun/awt/image/jpeg/jpegdecoder.c index 43edba61f..cea158e17 100644 --- a/src/share/native/sun/awt/image/jpeg/jpegdecoder.c +++ b/src/share/native/sun/awt/image/jpeg/jpegdecoder.c @@ -234,9 +234,9 @@ static int GET_ARRAYS(JNIEnv *env, sun_jpeg_source_ptr src) } if (src->hOutputBuffer) { assert(src->outbuf.ip == 0); + src->outbufSize = (*env)->GetArrayLength(env, src->hOutputBuffer); src->outbuf.ip = (int *)(*env)->GetPrimitiveArrayCritical (env, src->hOutputBuffer, 0); - src->outbufSize = (*env)->GetArrayLength(env, src->hOutputBuffer); if (src->outbuf.ip == 0) { RELEASE_ARRAYS(env, src); return 0; -- GitLab