--===============6485364401274405734== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://git.reviewboard.kde.org/r/114519/#review45900 ----------------------------------------------------------- kdeui/widgets/klineedit.cpp This could even be fullLength/2 given that the code uses left(letters) and right(letters). After half, we'll get redundant characters. - David Faure On Dec. 17, 2013, 3:15 p.m., Axel Arnold wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > http://git.reviewboard.kde.org/r/114519/ > ----------------------------------------------------------- > > (Updated Dec. 17, 2013, 3:15 p.m.) > > > Review request for kdelibs. > > > Bugs: 328263 > http://bugs.kde.org/show_bug.cgi?id=328263 > > > Repository: kdelibs > > > Description > ------- > > If KLineEdit has squeezed text enabled, but the widget has still zero width, KLineEdit::setSqueezedText() can go into an endless loop trying to remove more than all letters from the string. This patch fixes both this underrun and the corresponding possible overrun if the squeezed text is too small. The underrun is responsible for endless loops in digikam, see the corresponding bug report. > > > Diffs > ----- > > kdeui/widgets/klineedit.cpp 2193ef2969d49ad602e66da7776feda4b7595b13 > > Diff: http://git.reviewboard.kde.org/r/114519/diff/ > > > Testing > ------- > > > Thanks, > > Axel Arnold > > --===============6485364401274405734== Content-Type: text/html; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit
This is an automatically generated e-mail. To reply, visit: http://git.reviewboard.kde.org/r/114519/

kdeui/widgets/klineedit.cpp (Diff revision 1)
void KLineEdit::setSqueezedText()
614
             } while (squeezedWidth < labelWidth);
615
             } while (squeezedWidth < labelWidth && letters < fullLength);
This could even be fullLength/2 given that the code uses left(letters) and right(letters). After half, we'll get redundant characters.

- David Faure


On December 17th, 2013, 3:15 p.m. UTC, Axel Arnold wrote:

Review request for kdelibs.
By Axel Arnold.

Updated Dec. 17, 2013, 3:15 p.m.

Bugs: 328263
Repository: kdelibs

Description

If KLineEdit has squeezed text enabled, but the widget has still zero width, KLineEdit::setSqueezedText() can go into an endless loop trying to remove more than all letters from the string. This patch fixes both this underrun and the corresponding possible overrun if the squeezed text is too small. The underrun is responsible for endless loops in digikam, see the corresponding bug report.

Diffs

  • kdeui/widgets/klineedit.cpp (2193ef2969d49ad602e66da7776feda4b7595b13)

View Diff

--===============6485364401274405734==--