mirror of
https://github.com/pgvector/pgvector.git
synced 2026-10-23 10:48:54 +03:00
Hardened VECTOR_ARRAY_SIZE [skip ci]
This commit is contained in:
@@ -315,7 +315,7 @@ typedef struct IvfflatScanOpaqueData
|
||||
|
||||
typedef IvfflatScanOpaqueData * IvfflatScanOpaque;
|
||||
|
||||
#define VECTOR_ARRAY_SIZE(_length, _size) (sizeof(VectorArrayData) + (_length) * MAXALIGN(_size))
|
||||
#define VECTOR_ARRAY_SIZE(_length, _size) add_size(sizeof(VectorArrayData), mul_size(_length, MAXALIGN(_size)))
|
||||
|
||||
/* Use functions instead of macros to avoid double evaluation */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user