]> git.sur5r.net Git - u-boot/blobdiff - fs/ext2/ext2fs.c
Merge with /home/sr/git/u-boot/nand-timeout
[u-boot] / fs / ext2 / ext2fs.c
index c21d2d6172214e6a4ff2909851413ff89b52d398..9cf2fb7ba494499a1afe38a63f6c6fb378895cf1 100644 (file)
@@ -389,7 +389,7 @@ int ext2fs_read_file
        int blockcnt;
        int log2blocksize = LOG2_EXT2_BLOCK_SIZE (node->data);
        int blocksize = 1 << (log2blocksize + DISK_SECTOR_BITS);
-       unsigned int filesize = node->inode.size;
+       unsigned int filesize = __le32_to_cpu(node->inode.size);
 
        /* Adjust len so it we can't read past the end of the file.  */
        if (len > filesize) {