You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make incremental update of uncompressed index.tar more robust
The current code blindly assumes that the pre-existing index.tar is a
prefix to the new uncompressed index.tar;
Besides the possibility of data corruption, the incremental
index.tar.gz update logic however supports update transactions which
can violate this assumption, resulting in a state where the index.tar
doesn't get updated or alternative gets corrupted for real.
This patch makes the incremental update of the uncompressed index.tar
more robust by verifying that the prefix of the old index.tar is in
fact contained in the new index.tar data stream it is to be updated
with. If this validation fails, the code falls back to the (slower)
non-incremental full decompression codepath. This guarantees that the
uncompressed index.tar will be consistent with the compressed
index.tar.gz.
This fixes#196.
0 commit comments