chart2/source/view/main/Clipping.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
New commits: commit 470bc862796a517090448ca18622eca22550a0e4 Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Thu Jun 2 09:45:26 2022 +0200 Commit: Stephan Bergmann <sberg...@redhat.com> CommitDate: Thu Jun 2 11:21:53 2022 +0200 Use o3tl::make_unsigned, nPolygonIndex is already clamped to non-negative here Change-Id: Idaf80e28f177c84faaec2c047db2b4435b9e7e15 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135291 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sberg...@redhat.com> diff --git a/chart2/source/view/main/Clipping.cxx b/chart2/source/view/main/Clipping.cxx index 7509f53fb28d..713e88c26bd0 100644 --- a/chart2/source/view/main/Clipping.cxx +++ b/chart2/source/view/main/Clipping.cxx @@ -21,6 +21,7 @@ #include <CommonConverters.hxx> #include <BaseGFXHelper.hxx> +#include <o3tl/safeint.hxx> #include <osl/diagnose.h> #include <com/sun/star/drawing/Position3D.hpp> @@ -217,7 +218,7 @@ void lcl_addPointToPoly( std::vector<std::vector<css::drawing::Position3D>>& rPo } //make sure that we have enough polygons - if(nPolygonIndex >= static_cast<sal_Int32>(rPoly.size()) ) + if(o3tl::make_unsigned(nPolygonIndex) >= rPoly.size() ) { rPoly.resize(nPolygonIndex+1); rResultPointCount.resize(nPolygonIndex+1,0);