Summary: | [PATCH] [testcase] Formatting of large roman numbers leads to undefined behavior | ||
---|---|---|---|
Product: | [Applications] konqueror | Reporter: | Roland Illig <roland.illig> |
Component: | khtml | Assignee: | Konqueror Developers <konq-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | maksim |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | NetBSD pkgsrc | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | testcase |
Description
Roland Illig
2006-01-02 01:17:37 UTC
Thanks for the patch. Any place on the web actually use that, or should I stop being lazy and make a testcase? ;-) Created attachment 14102 [details]
testcase
Forgot to confirm. SVN commit 500228 by orlovich: Apply patch from Roland Illig (roland dot illig at the host gmx with tld de) to behave sanely for Roman counters > 4000 BUG:119352 M +1 -1 enumerate.cpp --- branches/KDE/3.5/kdelibs/khtml/rendering/enumerate.cpp #500227:500228 @@ -34,7 +34,7 @@ QString toRoman( int number, bool upper ) { - if (number < 1) return QString::number(number); + if (number < 1 || number > 3999) return QString::number(number); QString roman; static const QChar ldigits[] = { 'i', 'v', 'x', 'l', 'c', 'd', 'm' }; static const QChar udigits[] = { 'I', 'V', 'X', 'L', 'C', 'D', 'M' }; SVN commit 500230 by orlovich: Regression test for #119352 CCBUG:119352 A baseline/unsorted/119352.html-dom AM baseline/unsorted/119352.html-dump.png A baseline/unsorted/119352.html-render A tests/unsorted/119352.html ** trunk/tests/khtmltests/regression/baseline/unsorted/119352.html-dump.png #property svn:mime-type + application/octet-stream |