sc/source/filter/excel/impop.cxx | 6 ++++++ 1 file changed, 6 insertions(+)
New commits: commit 30d2c8bbde0c465a2f87324eb974ad8e68e28cd7 Author: Noel Grandin <noelgran...@gmail.com> AuthorDate: Wed Oct 9 19:27:04 2024 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Thu Oct 10 07:45:46 2024 +0200 cid#1606594 Overflowed constant Change-Id: Ie5445a5287de7d1752dd3aefaa2969d92fed6da1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174741 Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> Tested-by: Jenkins diff --git a/sc/source/filter/excel/impop.cxx b/sc/source/filter/excel/impop.cxx index 163e10b66d55..323ed830b301 100644 --- a/sc/source/filter/excel/impop.cxx +++ b/sc/source/filter/excel/impop.cxx @@ -480,6 +480,12 @@ void ImportExcel::Columndefault() OSL_ENSURE( aIn.GetRecLeft() == static_cast<std::size_t>(nColMac - nColMic) * 3 + 2, "ImportExcel::Columndefault - wrong record size" ); + if (nColMac == 0) + { + SAL_WARN("sc", "dodgy column defaults"); + return; + } + nColMac--; if( nColMac > rD.MaxCol() )