From 0216369a736a83bc9440c24220c803127e671c5c Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 9 Oct 2024 19:29:50 +0200 Subject: [PATCH] cid#1606699 Overflowed constant Change-Id: Ibd5179a015c2aa82111badb6d181294435b8ef21 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174742 Reviewed-by: Noel Grandin Tested-by: Jenkins --- sc/source/filter/excel/impop.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sc/source/filter/excel/impop.cxx b/sc/source/filter/excel/impop.cxx index 323ed830b301..38159100c589 100644 --- a/sc/source/filter/excel/impop.cxx +++ b/sc/source/filter/excel/impop.cxx @@ -246,7 +246,7 @@ void ImportExcel::ReadDimensions() nXclRow2 = maStrm.ReaduInt32(); aXclUsedArea.maFirst.mnCol = maStrm.ReaduInt16(); aXclUsedArea.maLast.mnCol = maStrm.ReaduInt16(); - if( (nXclRow1 < nXclRow2) && (aXclUsedArea.GetColCount() > 1) && + if( nXclRow2 != 0 && (nXclRow1 < nXclRow2) && (aXclUsedArea.GetColCount() > 1) && (nXclRow1 <= o3tl::make_unsigned( GetScMaxPos().Row() )) ) { // Excel stores first unused row/column index