summaryrefslogtreecommitdiff
path: root/x11/kdelibs4/files/patch-CVE-2006-4811
blob: 8a9c8dfebb570c2970d31fd04357c42ccba6b7e0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Index: khtml/rendering/render_image.cpp
===================================================================
--- khtml/rendering/render_image.cpp	(revision 594232)
+++ khtml/rendering/render_image.cpp	(working copy)
@@ -294,7 +294,8 @@ void RenderImage::paint(PaintInfo& paint
         if ( (cWidth != intrinsicWidth() ||  cHeight != intrinsicHeight()) &&
              pix.width() > 0 && pix.height() > 0 && i->valid_rect().isValid())
         {
-            if (resizeCache.isNull() && cWidth && cHeight && intrinsicWidth() && intrinsicHeight())
+            if (resizeCache.isNull() && cWidth > 0 && cHeight > 0 && intrinsicWidth() && intrinsicHeight()
+                    && cWidth < 4096 && cHeight < 4096)
             {
                 QRect scaledrect(i->valid_rect());
 //                 kdDebug(6040) << "time elapsed: " << dt->elapsed() << endl;