Skip to content

Commit

Permalink
Raise an exception on invalid TAG data (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
Schamper authored Nov 13, 2023
1 parent af92e25 commit 67b1aaf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dissect/esedb/page.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,9 @@ def __init__(self, page: Page, num: int):
self.size = self.tag.cb_ & mask
self.offset = self.tag.ib_ & mask

if self.size == 0 and self.num != 0:
raise ValueError("Invalid TAG data, corrupt database?")

self.data = self.page.data[self.offset : self.offset + self.size]

flags = 0
Expand Down

0 comments on commit 67b1aaf

Please # to comment.