From 1afc62ef88274fea322f6c53857890fe17c9fdcf Mon Sep 17 00:00:00 2001 From: Slávek Banko Date: Mon, 19 May 2014 19:06:45 +0200 Subject: Fix overwriting memory for an application icon This resolves Bug 2033 --- src/kernel/qimage.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/kernel/qimage.cpp') diff --git a/src/kernel/qimage.cpp b/src/kernel/qimage.cpp index 214fc85..4c489d2 100644 --- a/src/kernel/qimage.cpp +++ b/src/kernel/qimage.cpp @@ -1531,12 +1531,12 @@ static bool convert_32_to_8( const QImage *src, QImage *dst, int conversion_flag int* line2[3]; int* pv[3]; if ( ( conversion_flags & Qt::Dither_Mask ) == Qt::DiffuseDither ) { - line1[0] = new int[src->width()]; - line2[0] = new int[src->width()]; - line1[1] = new int[src->width()]; - line2[1] = new int[src->width()]; - line1[2] = new int[src->width()]; - line2[2] = new int[src->width()]; + line1[0] = new int[sw]; + line2[0] = new int[sw]; + line1[1] = new int[sw]; + line2[1] = new int[sw]; + line1[2] = new int[sw]; + line2[2] = new int[sw]; pv[0] = new int[sw]; pv[1] = new int[sw]; pv[2] = new int[sw]; -- cgit v1.2.3