From 3c4c67254c75680e9e853edfeeb2fa921050676d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemys=C5=82aw=20Czerpak?= Date: Sat, 21 Mar 2015 12:54:05 +0100 Subject: [PATCH] 2015-03-21 12:54 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) * src/rdd/dbf1.c ! restored the line with initialization of allocated memory buffer I deleted by mistake removing my private comments before commit. Without this line sort could randomly crash on small tables (less then 65537 sorted records) --- ChangeLog.txt | 7 +++++++ src/rdd/dbf1.c | 1 + 2 files changed, 8 insertions(+) diff --git a/ChangeLog.txt b/ChangeLog.txt index 4d192c8729..055e54b23f 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -10,6 +10,13 @@ * Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment */ +2015-03-21 12:54 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) + * src/rdd/dbf1.c + ! restored the line with initialization of allocated memory buffer + I deleted by mistake removing my private comments before commit. + Without this line sort could randomly crash on small tables (less + then 65537 sorted records) + 2015-03-20 16:34 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) * include/Makefile - include/hbdbsort.h diff --git a/src/rdd/dbf1.c b/src/rdd/dbf1.c index 61b97a95e3..20497c5fda 100644 --- a/src/rdd/dbf1.c +++ b/src/rdd/dbf1.c @@ -5378,6 +5378,7 @@ static HB_ERRCODE hb_dbfSortFinish( LPDBSORTREC pSortRec ) pSortRec->pSwapPages[ 0 ].pnRecords = hb_dbfSortSort( pSortRec ); pSortRec->nPages = 1; pSortRec->pnIndex = ( HB_SORTIDX * ) hb_xrealloc( pSortRec->pnIndex, sizeof( HB_SORTIDX ) ); + pSortRec->pnIndex[ 0 ] = 0; if( pSortRec->pSortArray ) { hb_itemRelease( pSortRec->pSortArray );