mirror of
https://github.com/pgvector/pgvector.git
synced 2026-07-02 18:50:56 +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);
|
||||
|
||||
/* Ensure indexing does not overflow */
|
||||
if (numCenters * numCenters > INT_MAX)
|
||||
if (numCenters > INT_MAX / numCenters)
|
||||
elog(ERROR, "Indexing overflow detected. Please report a bug.");
|
||||
|
||||
/* Set support functions */
|
||||
|
||||
Reference in New Issue
Block a user