1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0025537: XmlMPrsStd_PositionDriver::Paste runtime check crash.

Increased a size of buffer in array of 'char' to fit the largest possible conversion from 'double' to %.17g string.
This commit is contained in:
mpv
2017-05-22 14:35:57 +03:00
committed by bugmaster
parent 87432b8278
commit a38db39de6
4 changed files with 32 additions and 3 deletions

View File

@@ -121,7 +121,7 @@ void XmlMXCAFDoc_CentroidDriver::Paste
if (!aTPos.IsNull())
{
gp_Pnt aPos = aTPos->Get();
char buf [64];
char buf[75]; // (24 + 1) * 3
Sprintf (buf, "%.17g %.17g %.17g", aPos.X(), aPos.Y(), aPos.Z());
XmlObjMgt::SetStringValue(theTarget.Element(), buf);
}