Name |
Last commit
|
Last update |
---|---|---|
.. | ||
backend | ||
alternates.c | ||
emptyobjects.c | ||
foreach.c | ||
freshen.c | ||
largefiles.c | ||
loose.c | ||
loose_data.h | ||
mixed.c | ||
pack_data.h | ||
pack_data_one.h | ||
packed.c | ||
packed_one.c | ||
sorting.c | ||
streamwrite.c |
In commit 7ec7aa4a (odb: assert on logic errors when writing objects, 2018-02-01), the check for whether we are trying to overflowing the fake stream buffer was changed from returning an error to raising an assert. The conversion forgot though that the logic around `assert`s are basically inverted. Previously, if the statement stream->written + len > steram->size evaluated to true, we would return a `-1`. Now we are asserting that this statement is true, and in case it is not we will raise an error. So the conversion to the `assert` in fact changed the behaviour to the complete opposite intention. Fix the assert by inverting its condition again and add a regression test.
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
backend | Loading commit data... | |
alternates.c | Loading commit data... | |
emptyobjects.c | Loading commit data... | |
foreach.c | Loading commit data... | |
freshen.c | Loading commit data... | |
largefiles.c | Loading commit data... | |
loose.c | Loading commit data... | |
loose_data.h | Loading commit data... | |
mixed.c | Loading commit data... | |
pack_data.h | Loading commit data... | |
pack_data_one.h | Loading commit data... | |
packed.c | Loading commit data... | |
packed_one.c | Loading commit data... | |
sorting.c | Loading commit data... | |
streamwrite.c | Loading commit data... |