Blob Blame History Raw
Backport of upstream commit:

From df5d2867e8004e51e18b89865bc4aa69229227b3 Mon Sep 17 00:00:00 2001
From: Richard Hughes <richard@hughsie.com>
Date: Mon, 19 Sep 2016 10:03:36 +0100
Subject: [PATCH] CVE-2015-5221

diff -pruN jasper-1.900.1.orig/src/libjasper/mif/mif_cod.c jasper-1.900.1/src/libjasper/mif/mif_cod.c
--- jasper-1.900.1.orig/src/libjasper/mif/mif_cod.c	2017-03-23 22:50:09.000000000 +0100
+++ jasper-1.900.1/src/libjasper/mif/mif_cod.c	2017-03-24 11:57:19.000000000 +0100
@@ -569,13 +569,13 @@ static int mif_process_cmpt(mif_hdr_t *h
 			break;
 		}
 	}
-	jas_tvparser_destroy(tvp);
 	if (!cmpt->sampperx || !cmpt->samppery) {
 		goto error;
 	}
 	if (mif_hdr_addcmpt(hdr, hdr->numcmpts, cmpt)) {
 		goto error;
 	}
+	jas_tvparser_destroy(tvp);
 	return 0;
 
 error: