mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-12 13:01:09 +03:00
Avoid allocating excess memory to the KeyInfo objects.
FossilOrigin-Name: df7859435161f3ecf36635ce574bf73573516a1f2c6e75be320619364e7067d1
This commit is contained in:
@@ -1031,7 +1031,7 @@ static void selectInnerLoop(
|
||||
** X extra columns.
|
||||
*/
|
||||
KeyInfo *sqlite3KeyInfoAlloc(sqlite3 *db, int N, int X){
|
||||
int nExtra = (N+X)*(sizeof(CollSeq*)+1);
|
||||
int nExtra = (N+X)*(sizeof(CollSeq*)+1) - sizeof(CollSeq*);
|
||||
KeyInfo *p = sqlite3DbMallocRawNN(db, sizeof(KeyInfo) + nExtra);
|
||||
if( p ){
|
||||
p->aSortOrder = (u8*)&p->aColl[N+X];
|
||||
|
||||
Reference in New Issue
Block a user