Skip to content

Commit 8a80b3d

Browse files
generatedunixname4593378654225212meta-codesync[bot]
authored andcommitted
signal in faiss::ArrayInvertedListsPanorama::ArrayInvertedListsPanorama() (facebookresearch#4987)
Summary: Pull Request resolved: facebookresearch#4987 Reviewed By: limqiying Differential Revision: D97905994 fbshipit-source-id: 89fac8d48766a2389b063ae425fa01f7f3aa86cf
1 parent 12675af commit 8a80b3d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

faiss/impl/index_read.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -480,6 +480,8 @@ std::unique_ptr<InvertedLists> read_InvertedLists_up(
480480
FAISS_CHECK_DESERIALIZATION_LOOP_LIMIT(nlist, "ilpn nlist");
481481
READ1(code_size);
482482
READ1(n_levels);
483+
FAISS_THROW_IF_NOT_FMT(
484+
n_levels > 0, "invalid ilpn n_levels %zd", n_levels);
483485
auto ailp = std::make_unique<ArrayInvertedListsPanorama>(
484486
nlist, code_size, n_levels);
485487
std::vector<size_t> sizes(nlist);

0 commit comments

Comments
 (0)