[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#578046: currupts archives on 64bit systems with buffers larger than 2gb





On Fri, 16 Apr 2010, Yuri D'Elia wrote:

Package: afio
Severity: important
Tags: patch

When the block size * block count equals to 2gb or more, afio corrupts the
archive by truncating all files larger than 2gb.
[...]

Thanks for the bug report and patch, I am reviewing and incorporating it in the upstream.

The patch upgrades some uints to size_t, but it does not upgrade the count argument of readall to size_t, so I think this might lead to the achive ending up corrupt because not all data is written into it if your memory buffer (size * block count) is over 4GB and the file being archived is over 4 GB. I am not entirely sure, I have not tested it to verify, but just a warning: if you upgraded to 4GB memory buffer you might have gotten corrupt archives.

Cheers,

Koen.



Reply to: