Skip to content

Commit 014c5ae

Browse files
committed
8297480: GetPrimitiveArrayCritical in imageioJPEG misses result - NULL check
Backport-of: 2f8a5c2eca0dc3dad08b7b2c33394ac214907008
1 parent edf4fb0 commit 014c5ae

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/java.desktop/share/native/libjavajpeg/imageioJPEG.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -713,6 +713,7 @@ static int setQTables(JNIEnv *env,
713713
CHECK_NULL_RETURN(table, 0);
714714
qdata = (*env)->GetObjectField(env, table, JPEGQTable_tableID);
715715
qdataBody = (*env)->GetPrimitiveArrayCritical(env, qdata, NULL);
716+
CHECK_NULL_RETURN(qdataBody, 0);
716717

717718
if (cinfo->is_decompressor) {
718719
decomp = (j_decompress_ptr) cinfo;

0 commit comments

Comments
 (0)