--- kdelibs-3.3.1/khtml/rendering/render_image.cpp.orig 2006-10-16 20:46:19.000000000 +0200 +++ kdelibs-3.3.1/khtml/rendering/render_image.cpp 2006-10-16 20:47:15.000000000 +0200 @@ -266,7 +266,8 @@ 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;