summaryrefslogtreecommitdiff
path: root/include/sqfs/predef.h
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2021-07-21 09:41:47 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2021-07-21 10:01:39 +0200
commitc2aac9df8b5b29780bfc4a32fd38facf6a9b84a6 (patch)
treecabaaa00d5c96da4a897dc814d1880c1c20e8ace /include/sqfs/predef.h
parentca476afbebda985e777ebf5009c980aee923b4da (diff)
Fix libsquashfs directory writer size accounting
The squashfs readdir() implementation in the Linux kernel returns non-existing "." and ".." entries for offsets 0 and 1, and after that reads from disk. For convenience, it was decided to store an off-by-3 value on disk instead of doing complex primary school math to adjust for this. This didn't show up until now, because the kernel implementation trusts the value from the directory header more than the actual size in the inode and happily reads 3 more than the inode would allow it to. This only showed up with 7-zip which subtracts 3 from the size and expects the result to be exact and bails if the directory headers suggest otherwise. And yes, I did consider making a "Holy Hand Granade of Antioch" reference, but consciously decided not to. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'include/sqfs/predef.h')
0 files changed, 0 insertions, 0 deletions