cid#1606594 Overflowed constant

Change-Id: Ie5445a5287de7d1752dd3aefaa2969d92fed6da1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174741
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
This commit is contained in:
Noel Grandin 2024-10-09 19:27:04 +02:00 committed by Noel Grandin
parent 12407f0668
commit 30d2c8bbde

View file

@ -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() )