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.
This commit is contained in:
Viktor Szakats
2009-07-23 18:19:36 +00:00
parent 4a51d89404
commit 0a95b29d0f
2 changed files with 6 additions and 1 deletions

View File

@@ -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

View File

@@ -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 );
}