diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 40dda30b74..cde59f4b09 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,12 @@ 2002-12-01 23:12 UTC+0100 Foo Bar */ +2004-08-01 14:38 UTC+0100 Viktor Szakats + + * source/rtl/filesys.c + ! Out of bound buffer access fixed. (I couldn't test this) + (Thanks to Chen Kedem) + 2004-07-27 20:41 UTC+0100 Antonio Linares * include/hbclass.ch + Added a previous #undef _HB_CLS_FUNCNAME for multiple classes diff --git a/harbour/source/rtl/filesys.c b/harbour/source/rtl/filesys.c index 8b4bd3aa84..981adf8188 100644 --- a/harbour/source/rtl/filesys.c +++ b/harbour/source/rtl/filesys.c @@ -1716,9 +1716,16 @@ USHORT HB_EXPORT hb_fsCurDirBuff( USHORT uiDrive, BYTE * pbyBuffer, ULONG ulLen so we don't need to strip it. [vszakats] */ if( pbyStart[ 1 ] == ':' ) + { pbyStart += 2; + ulLen -= 2; + } + if( strchr( OS_PATH_DELIMITER_LIST, pbyStart[ 0 ] ) ) + { pbyStart++; + ulLen--; + } if( pbyBuffer != pbyStart ) memmove( pbyBuffer, pbyStart, ulLen );