Page 1 of 1
New file format
Posted: Mon Jan 04, 2010 9:38 pm
What is the difference between FsArCh_002 and FsArCh_001?
Re: New file format
Posted: Mon Jan 04, 2010 11:04 pm
The difference is quite small: in the headers, the headerlen value was a u16 (16 bits unsigned integer) and now it's a u32. The problem was there was an integer overflow as soon as the header is bigger than 65535 bytes, and then the considered size was realsize % 65535. The consequence was a crash because we did a malloc(headerlen) and then the buffer was to small. The second consequence would have been a corruption in the archive but fortunately it crashed before that.
Cases with such a big header are quite rare, only one user reported that bug recently. But it had to be fixed and this modification was required in the file format. Each file and data block has an header in the archive. All based on the same structure. We had to run many tests on his machine before I understand what was causing the memory error, and I finally managed to reproduce the bug on my machine. And then it was fixed quickly.