I hacked together a minimal test case that searches with cargo-fuzz and found one:
[1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 247, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 197, 250, 0, 0, 0, 0, 0, 0, 255, 9, 9, 181, 225, 154, 128, 0, 0, 16, 0, 0, 0, 0, 0, 181, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 96, 255, 255, 5, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 46, 0, 0, 9, 9, 9, 181, 181, 181, 181, 1, 0, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 9, 181, 181, 181, 181, 55, 55, 55, 55, 55, 55, 55, 0, 0, 0, 181, 0, 0, 0, 0, 0, 181, 181, 64, 13, 245, 181, 181, 181, 181, 181, 181, 0, 245, 181, 181, 181, 181, 181, 181, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 181, 181, 181, 181, 0, 0, 0, 0, 0, 0, 0, 0, 181, 230, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 0, 0, 0, 0, 0, 12, 0, 247, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 46, 0, 0, 9, 9, 9, 181, 181, 181, 181, 1, 0, 0, 0, 0, 0, 0, 48, 0, 0, 0, 0, 0, 0, 0, 0, 181, 181, 181, 181, 13, 181, 180, 181, 181, 181, 181, 181, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 181, 181, 181, 181, 13, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 0, 0, 0, 5, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 247, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 181, 225, 154, 128, 0, 0, 16, 0, 0, 0, 0, 0, 181, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 224, 255, 255, 5, 255, 255, 255, 255, 255, 255, 233, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 247, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 9, 9, 181, 181, 181, 181, 55, 55, 55, 55, 55, 55, 54, 0, 0, 0, 0, 0, 0, 0, 0, 181, 181, 181, 64, 13, 245, 181, 181, 181, 181, 181, 181, 0, 245, 181, 181, 181, 181, 181, 181, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 254, 255, 255, 255, 9, 0]
hello! I've used the
tarcrate in a project to modify an archive and noticed the generated archives are invalid in some cases,/usr/bin/tarcomplains about a truncated archive and after some inspection I noticed the size that gets written appears to be multiplied by 8.This doesn't seem to be an interoperability issue, calling
.size()immediately after calling.set_size(...)also returns a value that's much bigger than what I intended to set.I hacked together a minimal test case that searches with cargo-fuzz and found one:
tar
Screenshot
Possibly related to #286, #298