Search
SailfishOS Open Build Service
>
Projects
>
home:sbinner
:
qt481
>
qt
> qt-4.8.0-add-bounds-checking-in-soft-scale.patch
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File qt-4.8.0-add-bounds-checking-in-soft-scale.patch of Package qt
From 838239abed531deba08eb728cb275cba9ad31e16 Mon Sep 17 00:00:00 2001 From: Robin Burchell <robin.burchell@collabora.com> Date: Sun, 13 Nov 2011 12:49:42 +0100 Subject: [PATCH] add bounds checking in soft scale TODO: this patch is probably wrong --- src/gui/painting/qblendfunctions.cpp | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/src/gui/painting/qblendfunctions.cpp b/src/gui/painting/qblendfunctions.cpp index fd3a8fc..c19cec6 100644 --- a/src/gui/painting/qblendfunctions.cpp +++ b/src/gui/painting/qblendfunctions.cpp @@ -649,6 +649,8 @@ void qt_scale_image_argb32_on_argb32(uchar *destPixels, int dbpl, sourceRect.x(), sourceRect.y(), sourceRect.width(), sourceRect.height(), const_alpha); #endif + if( sourceRect.x()<0 || sourceRect.y()<0 ) + return; if (const_alpha == 256) { Blend_ARGB32_on_ARGB32_SourceAlpha sourceAlpha; qt_scale_image_32bit(destPixels, dbpl, srcPixels, sbpl, -- 1.7.7.4