From e02d2b9328b02cde4f4fcbe2ead1fcc871117eba Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 30 Dec 2010 20:37:22 +0100 Subject: [PATCH] libblkid: fix endian conversion bug in NILFS Reported-by: Andrew Nayenko Signed-off-by: Karel Zak --- shlibs/blkid/src/superblocks/nilfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.39.5