changeset 13522:24cfe95d2741

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 14:44:10 +0300
parents 48cb26c30242
children 59ff08535492
files src/java.desktop/share/native/libjavajpeg/jpegdecoder.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.desktop/share/native/libjavajpeg/jpegdecoder.c	Mon Oct 26 23:41:41 2015 +0300
+++ b/src/java.desktop/share/native/libjavajpeg/jpegdecoder.c	Tue Nov 03 14:44:10 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;