summaryrefslogtreecommitdiffstats
path: root/searchlib
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2017-09-07 11:53:31 +0200
committerHenning Baldersheim <balder@yahoo-inc.com>2017-09-07 11:53:31 +0200
commit61f083cd0303f69a296471259b2582853078caa9 (patch)
treefcb59198ea65879ad332753814e84b345627e9d4 /searchlib
parentde8c68fc845fd90f1c93c9003b99edd9967ade6a (diff)
You do not more place in scratch buffer than the size of the query vector.
Diffstat (limited to 'searchlib')
-rw-r--r--searchlib/src/vespa/searchlib/features/dotproductfeature.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/searchlib/src/vespa/searchlib/features/dotproductfeature.cpp b/searchlib/src/vespa/searchlib/features/dotproductfeature.cpp
index b1c360b8ffb..cd84eadf536 100644
--- a/searchlib/src/vespa/searchlib/features/dotproductfeature.cpp
+++ b/searchlib/src/vespa/searchlib/features/dotproductfeature.cpp
@@ -108,7 +108,7 @@ template <typename A>
SparseDotProductExecutor<A>::SparseDotProductExecutor(const A * attribute, const V & queryVector, const IV & queryIndexes) :
DotProductExecutor<A>(attribute, queryVector),
_queryIndexes(queryIndexes),
- _scratch(std::max(static_cast<size_t>(attribute->getMaxValueCount()), queryIndexes.size()))
+ _scratch(queryIndexes.size())
{
}