r21957 by craig - Coverity 1350589-90 Fix uninitialised variables

scribus-commit scribus-commit at lists.scribus.net
Fri Apr 21 16:29:04 UTC 2017


Author: craig
Date: Fri Apr 21 16:29:04 2017
New Revision: 21957

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=21957
Log:
Coverity 1350589-90 Fix uninitialised variables

Modified:
    trunk/Scribus/scribus/plugins/import/pdf/slaoutput.cpp

Modified: trunk/Scribus/scribus/plugins/import/pdf/slaoutput.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21957&path=/trunk/Scribus/scribus/plugins/import/pdf/slaoutput.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/pdf/slaoutput.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/pdf/slaoutput.cpp	Fri Apr 21 16:29:04 2017
@@ -2510,6 +2510,7 @@
 	mskStr->reset();
 	Guchar *mdest = 0;
 	unsigned char * mbuffer = new unsigned char[maskWidth * maskHeight];
+	memset(mbuffer, 0, maskWidth * maskHeight);
 	for (int y = 0; y < maskHeight; y++)
 	{
 		mdest = (Guchar *)(mbuffer + y * maskWidth);
@@ -2653,6 +2654,7 @@
 	Guchar *mdest = 0;
 	int invert_bit = maskInvert ? 1 : 0;
 	unsigned char * mbuffer = new unsigned char[maskWidth * maskHeight];
+	memset(mbuffer, 0, maskWidth * maskHeight);
 	for (int y = 0; y < maskHeight; y++)
 	{
 		mdest = (Guchar *)(mbuffer + y * maskWidth);




More information about the scribus-commit mailing list