shithub: jbig2

Download patch

ref: 45f462f813cfef6be8f6755ebe02e8744222b3b1
parent: e2e186837bedf8211405c14b75c54849241193cd
author: Ralph Giles <giles@ghostscript.com>
date: Mon Mar 30 14:00:39 EDT 2009

Initialize Jbig2TextRegionParams.sbrat even when it is not used.

This avoids valgrind warnings in a later debug message which
unconditionally prints them out. After a patch by Alex Cherepanov,
ghostscript svn commit 9578.

--- a/jbig2_text.c
+++ b/jbig2_text.c
@@ -462,6 +462,9 @@
             params.sbrat[2] = segment_data[offset + 2];
             params.sbrat[3] = segment_data[offset + 3];
             offset += 4;
+	  } else {
+	    /* zero these for the sake of later debug messages */
+	    memset(params.sbrat, 0, sizeof(params.sbrat));
 	  }
       }