mirror of
https://github.com/pgvector/pgvector.git
synced 2026-07-09 22:30:58 +08:00
Fixed overflow check (should never be hit) [skip ci]
This commit is contained in:
@@ -280,7 +280,7 @@ ElkanKmeans(Relation index, VectorArray samples, VectorArray centers, const Ivff
|
|||||||
IvfflatCheckMemoryUsage(totalSize);
|
IvfflatCheckMemoryUsage(totalSize);
|
||||||
|
|
||||||
/* Ensure indexing does not overflow */
|
/* Ensure indexing does not overflow */
|
||||||
if (numCenters * numCenters > INT_MAX)
|
if (numCenters > INT_MAX / numCenters)
|
||||||
elog(ERROR, "Indexing overflow detected. Please report a bug.");
|
elog(ERROR, "Indexing overflow detected. Please report a bug.");
|
||||||
|
|
||||||
/* Set support functions */
|
/* Set support functions */
|
||||||
|
|||||||
Reference in New Issue
Block a user