-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
squashfs: fix directory listings (#195)
This fixes directory listings sometimes giving the error: could not parse directory header: header was 3 bytes, less than minimum 12 This was caused by a check for "at least one directory header" failing on empty directories. On careful examination of the spec, it says that if a directory header is present it must have at least one directory entry, but it is silent on whether a directory header has to exist or not. A non-existent header seems like the only way to sensibly implement empty directories. This adds a check to implement the "at least one directory entry per directory header" check and modifies the bounds check to catch a header with no entries. This also introduces a test checking that we can recurse the test squashfs file correctly - this fails without this patch.
- Loading branch information
Showing
6 changed files
with
595 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.