diff --git a/harbour/ChangeLog b/harbour/ChangeLog index fb3c7435dc..917e5be217 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,11 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-07-23 20:18 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * contrib/rddads/ads1.c + ! Fixed buffer size in one place related to MEMO field handling. + Caused memory corruption. + 2009-07-23 18:19 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + source/rtl/hbfeof.c * source/rtl/Makefile diff --git a/harbour/contrib/rddads/ads1.c b/harbour/contrib/rddads/ads1.c index 73a2ec2c45..02541f331c 100644 --- a/harbour/contrib/rddads/ads1.c +++ b/harbour/contrib/rddads/ads1.c @@ -2244,7 +2244,7 @@ static HB_ERRCODE adsGetValue( ADSAREAP pArea, USHORT uiIndex, PHB_ITEM pItem ) else { u32Len++; /* make room for NULL */ - pucBuf = ( UNSIGNED8 * ) hb_xgrab( u32Len ); + pucBuf = ( UNSIGNED8 * ) hb_xgrab( u32Len + 1 ); AdsGetBinary( pArea->hTable, ADSFIELD( uiIndex ), 0, pucBuf, &u32Len ); hb_itemPutCLPtr( pItem, ( char * ) pucBuf, u32Len ); }