mirror of
https://github.com/Open-Cascade-SAS/OCCT.git
synced 2026-05-18 17:06:14 +08:00
0023278: Buffer underflow using memset in osd_host.cxx
Zero memory uses the size of the array.
This commit is contained in:
@@ -258,7 +258,7 @@ OSD_Host :: OSD_Host () {
|
||||
nSize = MAX_COMPUTERNAME_LENGTH + 1;
|
||||
osVerInfo.dwOSVersionInfoSize = sizeof ( OSVERSIONINFO );
|
||||
|
||||
ZeroMemory ( szHostName, sizeof ( hostName ) );
|
||||
ZeroMemory ( szHostName, sizeof ( Standard_Character ) * (MAX_COMPUTERNAME_LENGTH + 1) );
|
||||
|
||||
if ( !GetVersionEx ( &osVerInfo ) ) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user