diff options
author | drh <> | 2025-06-01 21:38:35 +0000 |
---|---|---|
committer | drh <> | 2025-06-01 21:38:35 +0000 |
commit | d4c224b833b7c4d58f1e5748f5a1de2af013fc3d (patch) | |
tree | 0be39760bc399527ad52534ba5c0a606e62bf52a /src | |
parent | f18bf8997bc3843d342118709d431a24a889ec16 (diff) | |
download | sqlite-d4c224b833b7c4d58f1e5748f5a1de2af013fc3d.tar.gz sqlite-d4c224b833b7c4d58f1e5748f5a1de2af013fc3d.zip |
Fix an off-by-one error in the size computation of a vdbe-sorter.
[forum:/forumpost/c1cc8b057a|Forum post c1cc8b057a].
Problem introduced by checkin [d4307a0d43f42e96].
FossilOrigin-Name: 8b7a7fcf62e5c2742c243808fa482472954f2b4aae0bc7ae513bc07065c93737
Diffstat (limited to 'src')
-rw-r--r-- | src/vdbesort.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vdbesort.c b/src/vdbesort.c index 9a7e0760c..6b1b4cff5 100644 --- a/src/vdbesort.c +++ b/src/vdbesort.c @@ -969,7 +969,7 @@ int sqlite3VdbeSorterInit( assert( pCsr->eCurType==CURTYPE_SORTER ); assert( sizeof(KeyInfo) + UMXV(pCsr->pKeyInfo->nKeyField)*sizeof(CollSeq*) < 0x7fffffff ); - szKeyInfo = SZ_KEYINFO(pCsr->pKeyInfo->nKeyField+1); + szKeyInfo = SZ_KEYINFO(pCsr->pKeyInfo->nKeyField); sz = SZ_VDBESORTER(nWorker+1); pSorter = (VdbeSorter*)sqlite3DbMallocZero(db, sz + szKeyInfo); |