Skip to content

Commit

Permalink
Replace assert by map_grow
Browse files Browse the repository at this point in the history
Upstream commit: ef8ac7f

It will make code prepared for situation when number of solvables
is increased after query is created and applied.

The issue can be easilly triggered by adding remote RPMs therefore
the patch fixes a standard situation

Resolves: https://issues.redhat.com/browse/RHEL-27657
  • Loading branch information
j-mracek committed Apr 18, 2024
1 parent 7529d06 commit 3c5641a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libdnf/sack/query.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2313,7 +2313,7 @@ Query::Impl::apply()
if (!result)
initResult();
map_init(&m, pool->nsolvables);
assert(m.size == result->getMap()->size);
map_grow(result->getMap(), pool->nsolvables);
for (auto f : filters) {
map_empty(&m);
switch (f.getKeyname()) {
Expand Down

0 comments on commit 3c5641a

Please sign in to comment.