[Libreoffice] Review request: fix for crash fdo#36495

Kohei Yoshida kyoshida at novell.com
Fri May 20 09:11:49 PDT 2011


On Fri, 2011-05-20 at 07:48 -0600, Tor Lillqvist wrote:
> http://cgit.freedesktop.org/libreoffice/libs-core/commit/?id=37b8567fc76b78b1844461926175ba6919b8c7bd

> Not marked as a mostly annoying bug, but it is a crasher, so perhaps
> should be cherry-picked to the -3-4 or even -3-4-0 branches?

if ( !m_disabledUpdates.empty() )
    bInserted = showDescription( m_disabledUpdates[pos].aUpdateInfo );

Hmm... Shouldn't the check be the size of the vector vs pos?  The vector
is accessed by the pos index which may not be always 0.

So, I would make it

if ( pos < m_disabledUpdates.size() )
    bInserted = showDescription( m_disabledUpdates[pos].aUpdateInfo );

instead, to make it even more crash-proof.

Kohei

-- 
Kohei Yoshida, LibreOffice hacker, Calc
<kyoshida at novell.com>



More information about the LibreOffice mailing list