aboutsummaryrefslogtreecommitdiff
path: root/src/expr.c
diff options
context:
space:
mode:
authordan <Dan Kennedy>2024-07-20 16:11:12 +0000
committerdan <Dan Kennedy>2024-07-20 16:11:12 +0000
commitaecfb0a3b34894ddf9bc7411b89cc749f000d0b5 (patch)
tree242f0019dda461bd55f3f1b425e4f0329ef28d77 /src/expr.c
parentf73912694bd1671a664e3455524fc2821681c920 (diff)
downloadsqlite-aecfb0a3b34894ddf9bc7411b89cc749f000d0b5.tar.gz
sqlite-aecfb0a3b34894ddf9bc7411b89cc749f000d0b5.zip
Fix an oversized allocation in sqlite3ExprCodeIN().
FossilOrigin-Name: d7be326a80e7b3aa8fd6e5e059c04e6ad3feaffcb20b1e3c251d7195ddc1be8b
Diffstat (limited to 'src/expr.c')
-rw-r--r--src/expr.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/expr.c b/src/expr.c
index b9310fb39..53b0170ab 100644
--- a/src/expr.c
+++ b/src/expr.c
@@ -3927,9 +3927,7 @@ static void sqlite3ExprCodeIN(
if( sqlite3ExprCheckIN(pParse, pExpr) ) return;
zAff = exprINAffinity(pParse, pExpr);
nVector = sqlite3ExprVectorSize(pExpr->pLeft);
- aiMap = (int*)sqlite3DbMallocZero(
- pParse->db, nVector*(sizeof(int) + sizeof(char)) + 1
- );
+ aiMap = (int*)sqlite3DbMallocZero(pParse->db, nVector*sizeof(int));
if( pParse->db->mallocFailed ) goto sqlite3ExprCodeIN_oom_error;
/* Attempt to compute the RHS. After this step, if anything other than