mirror of
https://github.com/pgvector/pgvector.git
synced 2026-12-05 00:38:39 +00:00
Fixed overflow check (should never be hit) [skip ci]
This commit is contained in:
1 parent
f2617f02d1
commit
6731c49811
1 file changed
+1
-1
+1
-1
@@ -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