cid#1606906 Overflowed constant
Change-Id: I8ac1aabb50c5ef061b8ac359cb9d7ce8fe66c62c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172511 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
This commit is contained in:
@@ -416,12 +416,17 @@ void ImageMap::ImpReadNCSALine( std::string_view rLine )
|
||||
}
|
||||
else if ( aToken == "poly" )
|
||||
{
|
||||
const sal_uInt16 nCount = comphelper::string::getTokenCount(aStr, ',') - 1;
|
||||
const sal_Int32 nTokenCount = comphelper::string::getTokenCount(aStr, ',');
|
||||
const OUString aURL( ImpReadNCSAURL( &pStr ) );
|
||||
tools::Polygon aPoly( nCount );
|
||||
tools::Polygon aPoly;
|
||||
if (nTokenCount > 0)
|
||||
{
|
||||
const sal_uInt16 nCount = nTokenCount - 1;
|
||||
aPoly.SetSize(nCount);
|
||||
|
||||
for ( sal_uInt16 i = 0; i < nCount; i++ )
|
||||
aPoly[ i ] = ImpReadNCSACoords( &pStr );
|
||||
for (sal_uInt16 i = 0; i < nCount; ++i)
|
||||
aPoly[ i ] = ImpReadNCSACoords( &pStr );
|
||||
}
|
||||
|
||||
maList.emplace_back( new IMapPolygonObject( aPoly, aURL, OUString(), OUString(), OUString(), OUString() ) );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user