From d015d218045d6d46fc5ea6940201c964a5dd5204 Mon Sep 17 00:00:00 2001 From: Pawel Date: Fri, 13 Jul 2012 15:40:22 +0200 Subject: [PATCH] 0023277: Buffer underflow using memset in osd_path.cxx The parameter used in memset matches the buffer size. --- src/OSD/OSD_Path.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/OSD/OSD_Path.cxx b/src/OSD/OSD_Path.cxx index 246422e24d..de9ffc715d 100755 --- a/src/OSD/OSD_Path.cxx +++ b/src/OSD/OSD_Path.cxx @@ -1052,10 +1052,10 @@ OSD_Path :: OSD_Path ( static char __ext [ _MAX_EXT ]; memset(__drive, 0,_MAX_DRIVE); - memset(__dir, 0,_MAX_DRIVE); - memset(__trek, 0,_MAX_DRIVE); - memset(__fname, 0,_MAX_DRIVE); - memset(__ext, 0,_MAX_DRIVE); + memset(__dir, 0,_MAX_DIR); + memset(__trek, 0,_MAX_DIR); + memset(__fname, 0,_MAX_FNAME); + memset(__ext, 0,_MAX_EXT); Standard_Character chr; TEST_RAISE( aSysType, TEXT( "OSD_Path" ) );