From: Karel Zak Date: Thu, 30 Dec 2010 19:37:22 +0000 (+0100) Subject: libblkid: fix endian conversion bug in NILFS X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e02d2b9328b02cde4f4fcbe2ead1fcc871117eba;p=util-linux libblkid: fix endian conversion bug in NILFS Reported-by: Andrew Nayenko Signed-off-by: Karel Zak --- diff --git a/shlibs/blkid/src/superblocks/nilfs.c b/shlibs/blkid/src/superblocks/nilfs.c index bf169182..1f8f3a69 100644 --- a/shlibs/blkid/src/superblocks/nilfs.c +++ b/shlibs/blkid/src/superblocks/nilfs.c @@ -84,7 +84,7 @@ static int probe_nilfs2(blkid_probe pr, const struct blkid_idmag *mag) if (!sb) return -1; - bytes = le32_to_cpu(sb->s_bytes); + bytes = le16_to_cpu(sb->s_bytes); crc = crc32(le32_to_cpu(sb->s_crc_seed), (unsigned char *)sb, sumoff); crc = crc32(crc, sum, 4); crc = crc32(crc, (unsigned char *)sb + sumoff + 4, bytes - sumoff - 4);