提交 0427b4f8 编写于 作者: V vadim

8141213: [Parfait]Potentially blocking function GetArrayLength called in JNI...

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
上级 facacb65
...@@ -234,9 +234,9 @@ static int GET_ARRAYS(JNIEnv *env, sun_jpeg_source_ptr src) ...@@ -234,9 +234,9 @@ static int GET_ARRAYS(JNIEnv *env, sun_jpeg_source_ptr src)
} }
if (src->hOutputBuffer) { if (src->hOutputBuffer) {
assert(src->outbuf.ip == 0); assert(src->outbuf.ip == 0);
src->outbufSize = (*env)->GetArrayLength(env, src->hOutputBuffer);
src->outbuf.ip = (int *)(*env)->GetPrimitiveArrayCritical src->outbuf.ip = (int *)(*env)->GetPrimitiveArrayCritical
(env, src->hOutputBuffer, 0); (env, src->hOutputBuffer, 0);
src->outbufSize = (*env)->GetArrayLength(env, src->hOutputBuffer);
if (src->outbuf.ip == 0) { if (src->outbuf.ip == 0) {
RELEASE_ARRAYS(env, src); RELEASE_ARRAYS(env, src);
return 0; return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册