summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-04-07 02:10:54 -0500
committerSlávek Banko <slavek.banko@axis.cz>2013-04-08 18:07:35 +0200
commit3ab7d7ba97776bdb079d743abe75f65957a77179 (patch)
treefb54c8d43b5e6bfc163dc9bc6fb1dba736a7fc29
parented0d72dedcd806a12e749111f6cff13b278657b5 (diff)
downloadtdelibs-3ab7d7ba97776bdb079d743abe75f65957a77179.tar.gz
tdelibs-3ab7d7ba97776bdb079d743abe75f65957a77179.zip
Fix KSVGIconPainter deadlock with specifically formatted input files
This resolves Bug 1418 (cherry picked from commit 3fefe5e7d33c6c28d8109f5791c1e0a4a432a07f)
-rw-r--r--kdecore/svgicons/ksvgiconpainter.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/kdecore/svgicons/ksvgiconpainter.cpp b/kdecore/svgicons/ksvgiconpainter.cpp
index 379b0e682..1e83509db 100644
--- a/kdecore/svgicons/ksvgiconpainter.cpp
+++ b/kdecore/svgicons/ksvgiconpainter.cpp
@@ -2208,16 +2208,22 @@ void KSVGIconPainter::drawPath(const TQString &data, bool filled)
break;
}
- if(*ptr == '+' || *ptr == '-' || (*ptr >= '0' && *ptr <= '9'))
+ if(*ptr == '+' || *ptr == '-' || *ptr == '.' || (*ptr >= '0' && *ptr <= '9'))
{
// there are still coords in this command
if(command == 'M')
+ {
command = 'L';
+ }
else if(command == 'm')
+ {
command = 'l';
+ }
}
else
+ {
command = *(ptr++);
+ }
// Detect reflection points
if(lastCommand != 'C' && lastCommand != 'c' &&