pgvector.git / summary / log / commit / refs

commit    e7771fd7d345305b648c92ff2832e1b62db90f96
Author:   Andrew Kane <andrew@ankane.org>
Date:     Wed Jul 29 01:08:13 2026 +0000

    Hardened VectorArrayInit [skip ci]


src/ivfutils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ivfutils.c b/src/ivfutils.c index 4a3ce194..2ba6a4e4 100644 --- a/src/ivfutils.c +++ b/src/ivfutils.c @@ -36,7 +36,7 @@ VectorArrayInit(int maxlen, int dimensions, Size itemsize) res->maxlen = maxlen; res->dim = dimensions; res->itemsize = itemsize; - res->items = palloc_extended(maxlen * itemsize, MCXT_ALLOC_ZERO | MCXT_ALLOC_HUGE); + res->items = palloc_extended(mul_size(maxlen, itemsize), MCXT_ALLOC_ZERO | MCXT_ALLOC_HUGE); return res; } [parent: b818ae17ec8a]