mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: ensightBinaryStream: avoid overflow. Fixes #132
This commit is contained in:
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -97,8 +97,8 @@ public:
|
|||||||
|
|
||||||
virtual void write(const char* val)
|
virtual void write(const char* val)
|
||||||
{
|
{
|
||||||
char buffer[80] = {0};
|
char buffer[80];
|
||||||
strcpy(buffer, val);
|
strncpy(buffer, val, 80);
|
||||||
str_().write(buffer, 80*sizeof(char));
|
str_().write(buffer, 80*sizeof(char));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user