This hopefully fixes the original problem addressed by the reverted
patch
7cb962c7.
The bug was introduced by myself in
f991dbd3 "fsck.cramfs: allow smaller superblock sizes"
CC: Tobias Stoeckmann <tobias@stoeckmann.org>
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
errx(FSCK_EX_ERROR, _("unsupported filesystem features"));
/* What are valid superblock sizes? */
- if (super.size < sizeof(struct cramfs_super))
+ if (super.size < *start + sizeof(struct cramfs_super))
errx(FSCK_EX_UNCORRECTED, _("superblock size (%d) too small"),
super.size);
-fsck.cramfs: file extends past end of filesystem
-fsck.cramfs: crc error
+fsck.cramfs: superblock size (76) too small
# GNU General Public License for more details.
#
TS_TOPDIR="${0%/*}/../.."
-TS_DESC="fsck endianness"
+TS_DESC="fsck bad header"
. $TS_TOPDIR/functions.sh
ts_init "$*"