From: kgv Date: Wed, 17 Feb 2016 14:37:43 +0000 (+0300) Subject: 0027172: Visualization - avoid signed integer overflow within Graphic3d_ArrayOfPrimitives X-Git-Tag: V7_0_0rc~41 X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=6273fa4b6c3ee16c5fa960168368f2960246aa97;p=occt-copy.git 0027172: Visualization - avoid signed integer overflow within Graphic3d_ArrayOfPrimitives --- 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) {