From 6273fa4b6c3ee16c5fa960168368f2960246aa97 Mon Sep 17 00:00:00 2001 From: kgv Date: Wed, 17 Feb 2016 17:37:43 +0300 Subject: [PATCH] 0027172: Visualization - avoid signed integer overflow within Graphic3d_ArrayOfPrimitives --- src/Graphic3d/Graphic3d_ArrayOfPrimitives.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Graphic3d/Graphic3d_ArrayOfPrimitives.cxx b/src/Graphic3d/Graphic3d_ArrayOfPrimitives.cxx index 7421d56593..ab3abb724c 100644 --- a/src/Graphic3d/Graphic3d_ArrayOfPrimitives.cxx +++ b/src/Graphic3d/Graphic3d_ArrayOfPrimitives.cxx @@ -106,7 +106,7 @@ Graphic3d_ArrayOfPrimitives::Graphic3d_ArrayOfPrimitives (const Graphic3d_TypeOf myIndices.Nullify(); return; } - memset (myAttribs->ChangeData (0), 0, myAttribs->Stride * myAttribs->NbElements); + memset (myAttribs->ChangeData (0), 0, size_t(myAttribs->Stride) * size_t(myAttribs->NbElements)); if (theMaxBounds > 0) {