Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


On Fri, Jun 01, 2012 at 05:15:57PM +0200, Lionel Elie Mamane wrote:

Attached patch fixes a crash when a row fails to refresh
correctly. (...)

The crash was as follows:

When doTryRefetch_throw fails (but does not throw an exception),
m_aKeyIter is incremented. In the case where after increment it
becomes m_aKeyMap.end(), then the recursive call (refreshRow()) goes
as follows:

if(isBeforeFirst() || isAfterLast() || !m_xStatement.is())
    return;

But isAferLast() is "m_aKeyIter == m_aKeyMap.end() &&
m_bRowCountFinal", so in the case that !m_bRowCountFinal, execution
continues with:

if ( m_aKeyIter->second.second.second.is() )

Bang, this dereferences m_aKeyMap.end(), which calls SIGABRT, which is
a crash.

After the patch, before the recursive call, fetchRow() is called. This
will either set m_aKeyIter to a valid (dereferencable) value or set
m_bRowCountFinal, which will keep the recursive call from
dereferencing m_aKeyIter.

-- 
Lionel

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.