Skip to content

Commit

Permalink
2024-10-28 16:57 UTC+0100 Aleksander Czajczynski (hb fki.pl)
Browse files Browse the repository at this point in the history
  * src/rdd/dbf1.c
    ! reading varchar binary field ("Q:B") from a .dbf
      could free a wrong pointer in the record buffer.
      Bug located and fixed by Marek.
  • Loading branch information
mdlugosz65 authored and alcz committed Oct 28, 2024
1 parent 40e7736 commit 4ae5151
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
6 changes: 6 additions & 0 deletions ChangeLog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@
Entries may not always be in chronological/commit order.
See license at the end of file. */

2024-10-28 16:57 UTC+0100 Aleksander Czajczynski (hb fki.pl)
* src/rdd/dbf1.c
! reading varchar binary field ("Q:B") from a .dbf
could free a wrong pointer in the record buffer.
Bug located and fixed by Marek.

2024-10-25 14:09 UTC+0200 Aleksander Czajczynski (hb fki.pl)
* contrib/hbziparc/ziparc.prg
! return value of hb_zipDeleteFile() is not logical,
Expand Down
10 changes: 6 additions & 4 deletions src/rdd/dbf1.c
Original file line number Diff line number Diff line change
Expand Up @@ -2193,12 +2193,14 @@ static HB_ERRCODE hb_dbfGetValue( DBFAREAP pArea, HB_USHORT uiIndex, PHB_ITEM pI
nLen = pField->uiLen;
}
if( ( pField->uiFlags & HB_FF_BINARY ) == 0 )
{
pszVal = hb_cdpnDup( ( const char * ) pArea->pRecord + pArea->pFieldOffset[ uiIndex ],
&nLen, pArea->area.cdPage, hb_vmCDP() );
else
pszVal = ( char * ) pArea->pRecord + pArea->pFieldOffset[ uiIndex ];

hb_itemPutCLPtr( pItem, pszVal, nLen );
hb_itemPutCLPtr( pItem, pszVal, nLen );
break;
}
pszVal = ( char * ) pArea->pRecord + pArea->pFieldOffset[ uiIndex ];
hb_itemPutCL( pItem, pszVal, nLen );
}
break;

Expand Down

0 comments on commit 4ae5151

Please sign in to comment.