[Harbour] OrdCreate() issue ?

Juan Gálvez soporte at dsgsoftware.com
Tue Aug 21 08:00:28 EDT 2007


Przemek,

Please, I know you aren't involved in xHarbour but perhaps you could be more
explicit ...

> Yes. These modifications are the reason of problem which can cause GPFs
> when "D8" date field is read from DBF.

In your changes on hb_dbfGetValue() this code :
            ...
            char szBuffer[ 9 ];
            memcpy( szBuffer, pArea->pRecord + pArea->pFieldOffset[
uiIndex ], 8 );
            szBuffer[ 8 ] = 0;
            hb_itemPutDS( pItem, szBuffer );
            ...
have been changed by :
            ...
            hb_itemPutDS( pItem, ( char * ) pArea->pRecord +
pArea->pFieldOffset[ uiIndex ] );
            ...

Peter changed on hb_dateStrGet() this code :
            ...
            if( szDate && szDate[ 8 ] == '\0' )
            ...
by :
            ...
            if( szDate && strlen( szDate ) >= 8 )
            ...

I'm not a C guru but I wonder if strlen() would cause GPF,s with these
changes.

Any suggestion ?

Many thanks
Juan



More information about the Harbour mailing list