shithub: jbig2

Download patch

ref: df7406d80c8d6c1afa6310b7cd764b86f1b4aae1
parent: 5f683dd6ad3bd0ec23cd7eac1307b235df8ad14f
author: Shailesh Mistry <shailesh.mistry@hotmail.co.uk>
date: Wed Nov 4 10:42:53 EST 2015

Bug 694179: Fix memory leak in jbig2dec

Ensure the image contents are initialised, so that, if an error occurs, the
image can be safely cleaned up.

No cluster differences.

--- a/jbig2_text.c
+++ b/jbig2_text.c
@@ -371,6 +371,7 @@
 			segment->number,
 			"couldn't allocate reference image");
 	        }
+                jbig2_image_clear(ctx, refimage, 0x00);
 
 		/* Table 12 */
 		rparams.GRTEMPLATE = params->SBRTEMPLATE;