ext2: Ensure the directory walk progresses
diff --git a/src/filo-fs-ext2.adb b/src/filo-fs-ext2.adb
index 7b138b2..89d2dbb 100644
--- a/src/filo-fs-ext2.adb
+++ b/src/filo-fs-ext2.adb
@@ -844,7 +844,8 @@
end if;
Dir_Entry_Length := File_Length (Read_LE16 (Dir_Entry_Header, 4));
- if File_Pos > File_Length'Last - Dir_Entry_Length or
+ if Dir_Entry_Length = 0 or
+ File_Pos > File_Length'Last - Dir_Entry_Length or
Unsigned_64 (File_Pos) >= Unsigned_64 (State.Inode.Size) - Unsigned_64 (Dir_Entry_Length)
then
return;