summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/depends.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/depends.c b/lib/depends.c
index ac2bd20c4..ebb45ab3e 100644
--- a/lib/depends.c
+++ b/lib/depends.c
@@ -975,6 +975,8 @@ int rpmdepOrder(rpmTransactionSet rpmdep) {
j++;
}
}
+ if (j > rpmdep->addedPackages.size) abort();
+
qsort(orderList, rpmdep->addedPackages.size, sizeof(*orderList),
orderListIndexCmp);
@@ -1003,6 +1005,8 @@ int rpmdepOrder(rpmTransactionSet rpmdep) {
}
}
+ if (newOrderCount != rpmdep->orderCount) abort();
+
free(rpmdep->order);
rpmdep->order = newOrder;
rpmdep->orderAlloced = rpmdep->orderCount;