]> err.no Git - util-linux/commitdiff
libblkid: fix endian conversion bug in NILFS
authorKarel Zak <kzak@redhat.com>
Thu, 30 Dec 2010 19:37:22 +0000 (20:37 +0100)
committerKarel Zak <kzak@redhat.com>
Thu, 30 Dec 2010 19:37:22 +0000 (20:37 +0100)
Reported-by: Andrew Nayenko <resver@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
shlibs/blkid/src/superblocks/nilfs.c

index bf169182a99a5bc36d750a93a86de85176d47aac..1f8f3a69fc83cdc38e0824a2ef489e74adb7bbe0 100644 (file)
@@ -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);