diff options
Diffstat (limited to 'src/btree.c')
-rw-r--r-- | src/btree.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/btree.c b/src/btree.c index c41fb81..0fdc680 100644 --- a/src/btree.c +++ b/src/btree.c @@ -6956,7 +6956,10 @@ static int fillInCell( n = nHeader + nPayload; testcase( n==3 ); testcase( n==4 ); - if( n<4 ) n = 4; + if( n<4 ){ + n = 4; + pPayload[nPayload] = 0; + } *pnSize = n; assert( nSrc<=nPayload ); testcase( nSrc<nPayload ); @@ -9402,7 +9405,10 @@ int sqlite3BtreeInsert( if( flags & BTREE_PREFORMAT ){ rc = SQLITE_OK; szNew = p->pBt->nPreformatSize; - if( szNew<4 ) szNew = 4; + if( szNew<4 ){ + szNew = 4; + newCell[3] = 0; + } if( ISAUTOVACUUM(p->pBt) && szNew>pPage->maxLocal ){ CellInfo info; pPage->xParseCell(pPage, newCell, &info); |