File jasper-CVE-2017-1000050.patch of Package jasper.18194

--- jasper-1.900.14/src/libjasper/jp2/jp2_enc.c	2017-07-11 10:03:41.265870827 +0200
+++ jasper-1.900.14/src/libjasper/jp2/jp2_enc.c	2017-07-11 10:06:03.028405233 +0200
@@ -115,6 +115,10 @@
 	iccstream = 0;
 	iccprof = 0;
 
+	if (jas_image_numcmpts(image) < 1) {
+		goto error;
+	}
+
 	allcmptssame = 1;
 	sgnd = jas_image_cmptsgnd(image, 0);
 	prec = jas_image_cmptprec(image, 0);
openSUSE Build Service is sponsored by