[PATCH] Check size when generating FrameSvg background
Aurélien Gâteau
aurelien.gateau at canonical.com
Tue Dec 22 17:11:59 CET 2009
(reviewboard seems to be down today, so sending this the old-fashioned way)
Hi,
Stumbled upon a bad_alloc exception in Plasma today: after some
debugging I found out that sometimes
FrameSvgPrivate::generateFrameBackground() tried to generate a
background of size 16777215 x 13. 16777215 is QWIDGETSIZE_MAX.
It seems the buggy size comes from the way the System Monitor applet
uses Plasma::Frame, but I thought adding a generic guard in
generateFrameBackground() would be useful, hence the attached patch.
Actually I am thinking it may make sense to set stricter limits, for
example ensuring each dimension is less than say 10000 pixels.
What do you think about this?
Aurélien
-------------- next part --------------
A non-text attachment was scrubbed...
Name: framesvg-check-size-before-generating.diff
Type: text/x-diff
Size: 828 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/plasma-devel/attachments/20091222/91f17c01/attachment.bin
More information about the Plasma-devel
mailing list