Hi Markus,

On Thu, 2012-09-27 at 00:34 +0200, Markus Mohrhard wrote:
> [1] fixes a crash when opening the test file. The problem is that we
> dereference a past the end element. The code was always wrong but we
> fixed another bug in this part of the code for 3-6 so that it now
> crashes.

        Amusing :-)

> [1] 
> http://cgit.freedesktop.org/libreoffice/core/commit/?id=70412d0f3f7979d3d069be8121d49dbb96775cce

        Seems reasonable, but would:

@@ -564,7 +564,7 @@ bool 
ScDBQueryDataIterator::DataAccessInternal::getCurrent(Value& rValue)
             return false;
 
         SCROW nThisRow = ScDBQueryDataIterator::GetRowByColEntryIndex(*mpDoc, 
nTab, nCol, nColRow);
-        while ( (nColRow < nCellCount) && (nThisRow < nRow) )
+        while ( (nColRow < nCellCount - 1) && (nThisRow < nRow) )
             nThisRow = ScDBQueryDataIterator::GetRowByColEntryIndex(*mpDoc, 
nTab, nCol, ++nColRow);
 
         if ( nColRow < nCellCount && nThisRow <= mpParam->nRow2 )

        Not have the same effect ? either way I cherry-picked as-is to -3-6.

        Thanks !

                Michael.

-- 
michael.me...@suse.com  <><, Pseudo Engineer, itinerant idiot

_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to