diff --git a/lib/ext2fs/csum.c b/lib/ext2fs/csum.c index a7172580..54b53a3c 100644 --- a/lib/ext2fs/csum.c +++ b/lib/ext2fs/csum.c @@ -274,7 +274,7 @@ static errcode_t __get_dirent_tail(ext2_filsys fs, rec_len = translate(d->rec_len); } - if ((void *)d > ((void *)dirent + fs->blocksize)) + if ((char *)d > ((char *)dirent + fs->blocksize)) return EXT2_ET_DIR_CORRUPTED; if (d != top) return EXT2_ET_DIR_NO_SPACE_FOR_CSUM;