aboutsummaryrefslogtreecommitdiff
path: root/lib/sqfs
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqfs')
-rw-r--r--lib/sqfs/read_super.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/sqfs/read_super.c b/lib/sqfs/read_super.c
index 801bf7f..7b738ea 100644
--- a/lib/sqfs/read_super.c
+++ b/lib/sqfs/read_super.c
@@ -88,6 +88,11 @@ int sqfs_super_read(sqfs_super_t *super, int fd)
return -1;
}
+ if (temp.id_count == 0) {
+ fputs("ID table in squashfs image is empty.\n", stderr);
+ return -1;
+ }
+
memcpy(super, &temp, sizeof(temp));
return 0;
fail_seek: