Closed travier closed 11 months ago
Note: Untested yet.
thread 'chunking::test::test_advanced_packing' panicked at 'assertion failed: high_size.len() < limit_hs_bins', lib/src/chunking.rs:470:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Found file: var/foo
Found file: var/foo
Found file: var/lib/nested/foo
thread 'chunking::test::test_packing_fcos' panicked at 'assertion failed: high_size.len() < limit_hs_bins', lib/src/chunking.rs:470:5
Looks like this assert just found another off by one in my change.
Verified in https://github.com/travier/ostree-containers/pull/1 that this fixes this issue.
If we have a low amount of high-size packages then we will drain with an index higher than the size of the Vec which triggers a panic.
Fixes: https://github.com/coreos/rpm-ostree/issues/4646