Skip to content

Commit

Permalink
Layers: Update LeechCore RawIO with better error handling for readlines
Browse files Browse the repository at this point in the history
Fixes #1419
  • Loading branch information
ikelos committed Jan 18, 2025
1 parent 0cd1520 commit 2fe8ee5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions volatility3/framework/layers/leechcore.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ def read(self, size: int = -1) -> bytes:

def readline(self, __size: Optional[int] = ...) -> bytes:
data = b""
if not __size:
__size = 0
while __size > self._chunk_size or __size < 0:
data += self.read(self._chunk_size)
index = data.find(b"\n")
Expand Down

0 comments on commit 2fe8ee5

Please sign in to comment.