Error when calling Amarok::decapitateString()

Mark Kretschmann kretschmann at kde.org
Thu Jan 8 18:21:41 UTC 2009


On Thu, Jan 8, 2009 at 7:01 PM, Nicholas Sinlock
<isolatedincident at gmail.com> wrote:
> #10 0xb6ad69b2 in qFatal(char const*, ...) () from /usr/lib/libQtCore.so.4
> #11 0xb6ad6a45 in qt_assert(char const*, char const*, int) () from
> /usr/lib/libQtCore.so.4
> #12 0xb79ed2cc in QString::at (this=0xbfa34604, i=17) at
> /usr/include/QtCore/qstring.h:644
> #13 0xb7a80a98 in Amarok::decapitateString (input=@0xbfa34600,
> ref=@0xbfa34604) at
> /home/nsinlock/kde/sources/trunk/extragear/multimedia/amarok/src/App.cpp:1011

If you look at the line causing this...

  if( t.endsWith( ' ' ) || !ref.at( t.length() ).isLetterOrNumber() )
// common part ends with a space or complete word

...you can see that the crash is likely caused by an out-of-bounds
array access. So the index of QString::at() is probably bigger than
the size of the string.

-- 
Mark Kretschmann
Amarok Developer
www.kde.org - amarok.kde.org



More information about the Amarok mailing list