summaryrefslogtreecommitdiff
path: root/fs/squashfs/dir.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/squashfs/dir.c')
-rw-r--r--fs/squashfs/dir.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/squashfs/dir.c b/fs/squashfs/dir.c
index 9dfe2ce0fb70..4a812bfcdd5e 100644
--- a/fs/squashfs/dir.c
+++ b/fs/squashfs/dir.c
@@ -173,8 +173,7 @@ static int squashfs_readdir(struct file *file, void *dirent, filldir_t filldir)
dir_count = le32_to_cpu(dirh.count) + 1;
- /* dir_count should never be larger than 256 */
- if (dir_count > 256)
+ if (dir_count > SQUASHFS_DIR_COUNT)
goto failed_read;
while (dir_count--) {