]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
libext2fs: fix endian handling of ext3_extent_header in inline_data
authorEric Sandeen <sandeen@redhat.com>
Tue, 4 Nov 2014 16:21:57 +0000 (11:21 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 4 Nov 2014 16:24:50 +0000 (11:24 -0500)
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
lib/ext2fs/inline_data.c

index 7eb8b946cd224751d886d3a3f52eca5bddf36a04..8167b76e113b140854c9dd82a7303e9952e70ae0 100644 (file)
@@ -420,7 +420,7 @@ ext2fs_inline_data_file_expand(ext2_filsys fs, ext2_ino_t ino,
                eh = (struct ext3_extent_header *) &inode->i_block[0];
                eh->eh_depth = 0;
                eh->eh_entries = 0;
-               eh->eh_magic = EXT3_EXT_MAGIC;
+               eh->eh_magic = ext2fs_cpu_to_le16(EXT3_EXT_MAGIC);
                i = (sizeof(inode->i_block) - sizeof(*eh)) /
                        sizeof(struct ext3_extent);
                eh->eh_max = ext2fs_cpu_to_le16(i);