From 8ec3edb0c542425c7e019e06e5c6c4cd22e153c2 Mon Sep 17 00:00:00 2001 From: Pawel Date: Fri, 13 Jul 2012 16:00:52 +0200 Subject: [PATCH] 0023278: Buffer underflow using memset in osd_host.cxx Zero memory uses the size of the array. --- src/OSD/OSD_Host.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/OSD/OSD_Host.cxx b/src/OSD/OSD_Host.cxx index e9d8e12218..5fb092552e 100755 --- a/src/OSD/OSD_Host.cxx +++ b/src/OSD/OSD_Host.cxx @@ -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 ) ) {