From 40b5c5cc4ed06a304c34a841f8df9c4a35bd85e1 Mon Sep 17 00:00:00 2001 From: Schamper <1254028+Schamper@users.noreply.github.com> Date: Tue, 7 Nov 2023 14:28:56 +0100 Subject: [PATCH] Explicitly reset file position to 0 --- dissect/fat/fat.py | 1 + 1 file changed, 1 insertion(+) diff --git a/dissect/fat/fat.py b/dissect/fat/fat.py index 29bd9d6..b2206d8 100644 --- a/dissect/fat/fat.py +++ b/dissect/fat/fat.py @@ -40,6 +40,7 @@ def __init__(self, fh, encoding="ibm437"): self.fh = fh self.encoding = encoding + fh.seek(0) sector = fh.read(512) bpb_size = len(c_fat.Bpb) self.bpb = c_fat.Bpb(sector[:bpb_size])