sc/source/filter/rtf/eeimpars.cxx | 6 ++++++ 1 file changed, 6 insertions(+)
New commits: commit 1e7ee035992a0b29f42eac56ad82e2a1b0fe8ccd Author: Xisco Fauli <[email protected]> AuthorDate: Fri Feb 10 10:50:24 2023 +0100 Commit: Xisco Fauli <[email protected]> CommitDate: Mon Feb 13 12:44:38 2023 +0000 sc: avoid divide by zero in ScEEImport::GraphicSize See https://crashreport.libreoffice.org/stats/signature/ScEEImport::GraphicSize(short,long,ScEEParseEntry%20*) Change-Id: Ia5acccb1118aff2486d23eabd536053e67f346ba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146915 Tested-by: Jenkins Reviewed-by: Xisco Fauli <[email protected]> diff --git a/sc/source/filter/rtf/eeimpars.cxx b/sc/source/filter/rtf/eeimpars.cxx index b9678e2fdd5f..e9ab9175ab8f 100644 --- a/sc/source/filter/rtf/eeimpars.cxx +++ b/sc/source/filter/rtf/eeimpars.cxx @@ -528,7 +528,13 @@ bool ScEEImport::GraphicSize( SCCOL nCol, SCROW nRow, ScEEParseEntry* pE ) } // Distribute line height difference between all affected lines SCROW nRowSpan = pE->nRowOverlap; + + assert(nRowSpan != 0); + if ( nRowSpan == 0 ) + return bHasGraphics; + nHeight /= nRowSpan; + if ( nHeight == 0 ) nHeight = 1; // For definite comparison for ( SCROW nR = nRow; nR < nRow + nRowSpan; nR++ )
