From 7acc8da51b2199069016e0a5f4db2918f699a3c8 Mon Sep 17 00:00:00 2001 From: Jakub Melka Date: Fri, 10 Jul 2020 18:30:37 +0200 Subject: [PATCH] Bugfix: heap corruption --- PdfForQtLib/sources/pdfcolorspaces.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PdfForQtLib/sources/pdfcolorspaces.cpp b/PdfForQtLib/sources/pdfcolorspaces.cpp index 08536c9..222e964 100644 --- a/PdfForQtLib/sources/pdfcolorspaces.cpp +++ b/PdfForQtLib/sources/pdfcolorspaces.cpp @@ -277,7 +277,7 @@ QImage PDFAbstractColorSpace::getImage(const PDFImageData& imageData, unsigned char* alphaLine = alphaMask.scanLine(i); std::vector inputColors(imageWidth * componentCount, 0.0f); - std::vector outputColors(imageWidth * componentCount, 0); + std::vector outputColors(imageWidth * 3, 0); auto itInputColor = inputColors.begin(); for (unsigned int j = 0; j < imageData.getWidth(); ++j)