You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
dd if=/dev/zero of=ext2.bin bs=1024 count=1000
mkfs.ext2 ext2.bin
mkdir mnt
sudo mount -o loop ext2.bin mnt/
echo hello world | sudo tee mnt/hello.txt
sudo umount mnt/
kaitai-struct-compiler -t python filesystem/ext2.ksy
python -c 'import ext2e = ext2.Ext2.from_file("ext2.bin")print(e.root_dir)print([ n.name for n in e.root_dir.entries ])'
File "ext2.py", line 217, in _read
self.entries.append(Ext2.DirEntry(self._io, self, self._root))
File "ext2.py", line 120, in __init__
self._read()
File "ext2.py", line 128, in _read
self.padding = self._io.read_bytes(((self.rec_len - self.name_len) - 8))
File "kaitaistruct.py", line 298, in read_bytes
raise ValueError(
ValueError: requested invalid -8 amount of bytes
ext2 parser is broken
repro:
fix?
still looks broken, as i dont see the
hello.txt
filetodo: use the array method
max
(docs)The text was updated successfully, but these errors were encountered: