squashfs-tools
squashfs-tools copied to clipboard
Calls to close in mksquashfs.c should check for errors
When running mksquashfs over a s3 fuse filesytem, s3 returned a 403 which prevented the close
call from succeeding. However, mksquashfs
ignored this error and acted as if the operation completed successfully. To be clear, nothing at all ultimately got written to the destination filesystem.
Here is where I suspect the close failed:
https://github.com/plougher/squashfs-tools/blob/188454662ed6de1332fe72dc119977b5ccb5fb1d/squashfs-tools/mksquashfs.c#L8033
Another unguarded close is here too: https://github.com/plougher/squashfs-tools/blob/master/squashfs-tools/mksquashfs.c#L6966