From ca37c1fbeb32101826d13e9039d4cef81d64513b Mon Sep 17 00:00:00 2001 From: Johan Vos Date: Thu, 30 Jan 2020 20:59:54 +0000 Subject: [PATCH] 8238249: GetPrimitiveArrayCritical passed with hardcoded FALSE value Reviewed-by: kcr --- modules/javafx.graphics/src/main/native-iio/jpegloader.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/javafx.graphics/src/main/native-iio/jpegloader.c b/modules/javafx.graphics/src/main/native-iio/jpegloader.c index 025c94fadf0..a461c460282 100644 --- a/modules/javafx.graphics/src/main/native-iio/jpegloader.c +++ b/modules/javafx.graphics/src/main/native-iio/jpegloader.c @@ -1664,8 +1664,7 @@ JNIEXPORT jboolean JNICALL Java_com_sun_javafx_iio_jpeg_JPEGImageLoader_decompre num_scanlines = jpeg_read_scanlines(cinfo, &scanline_ptr, 1); if (num_scanlines == 1) { - jboolean iscopy = FALSE; - jbyte *body = (*env)->GetPrimitiveArrayCritical(env, barray, &iscopy); + jbyte *body = (*env)->GetPrimitiveArrayCritical(env, barray, NULL); if (body == NULL) { fprintf(stderr, "decompressIndirect: GetPrimitiveArrayCritical returns NULL: out of memory\n"); return JNI_FALSE;