Bug 106847 - polyline points freezes konqueror and eats all memory
Summary: polyline points freezes konqueror and eats all memory
Status: RESOLVED UNMAINTAINED
Alias: None
Product: ksvg
Classification: Miscellaneous
Component: general (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Nikolas Zimmermann
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-05 17:20 UTC by Clara Gnos
Modified: 2011-10-17 21:06 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
polyline_crash.svg (345 bytes, image/svg+xml)
2005-06-05 17:24 UTC, Clara Gnos
Details
Silently ignore polygons and polylines that would trigger this (895 bytes, patch)
2008-08-13 15:57 UTC, Steve Cotton
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Clara Gnos 2005-06-05 17:20:50 UTC
Version:            (using KDE KDE 3.4.1)
Installed from:    Gentoo Packages
Compiler:          gcc (GCC) 3.3.5-20050130 (Gentoo 3.3.5.20050130-r1, ssp-3.3.5.20050130-1, pie-8.7.7.1)
 
OS:                Linux

When somebody opens a special created svg file with a motified points list, konqueror freezes and eats more and more memory. The special points list is just a pointlist with a missing param (something like this: "1,1 2 3,3").
Comment 1 Clara Gnos 2005-06-05 17:24:53 UTC
Created attachment 11340 [details]
polyline_crash.svg

svg with a polyline. The polyline has a incomplete pointslist:

<polyline points="1,0 1 1,20" />

KSVG will just freeze and eat more and more memory
Comment 2 Steve Cotton 2008-08-13 15:57:21 UTC
Created attachment 26833 [details]
Silently ignore polygons and polylines that would trigger this

I've fixed this in Debian bug 493363
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=493363

In SVGAnimatedPointsImpl::parsePoints there's a for loop over an
iterator.  Each time through the loop takes two elements from the
iterator, but only tests the exit condition once.

The initial report here suggests that only maliciously-constructed images can
trigger this.  It can be triggered by images in the OpenClipart project that
use the SVG path element's extended grammar instead of using the SVG basic
shape elements' simple grammar (I think that's a bug in OpenClipart).
Comment 3 Christoph Feck 2011-10-17 21:06:55 UTC
This component has been replaced with the QtSvg based "svgpart" in KDE 4. If
this issue still needs to be addressed, please add a comment.