changeset 11550:941474f247d2

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
author vadim
date Tue, 03 Nov 2015 20:16:40 +0300
parents ce5c56e0676f
children fe6354276d45
files src/share/native/sun/awt/image/jpeg/jpegdecoder.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/native/sun/awt/image/jpeg/jpegdecoder.c	Fri Oct 30 10:59:05 2015 +0300
+++ b/src/share/native/sun/awt/image/jpeg/jpegdecoder.c	Tue Nov 03 20:16:40 2015 +0300
@@ -234,9 +234,9 @@
     }
     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;