Skip to content

Commit

Permalink
Merge pull request #1514 from volatilityfoundation/file_descriptors_e…
Browse files Browse the repository at this point in the history
…xception_handling

Add proper exception handling in file descriptor enumeration
  • Loading branch information
ikelos authored Feb 7, 2025
2 parents bf03ecd + 4c2d21d commit e5e4d30
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion volatility3/framework/constants/_version.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# We use the SemVer 2.0.0 versioning scheme
VERSION_MAJOR = 2 # Number of releases of the library with a breaking change
VERSION_MINOR = 20 # Number of changes that only add to the interface
VERSION_PATCH = 0 # Number of changes that do not change the interface
VERSION_PATCH = 1 # Number of changes that do not change the interface
VERSION_SUFFIX = ""

PACKAGE_VERSION = (
Expand Down
14 changes: 7 additions & 7 deletions volatility3/framework/symbols/linux/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,16 +339,16 @@ def files_descriptors_for_process(
symbol_table: str,
task: interfaces.objects.ObjectInterface,
):
# task.files can be null
if not (task.files and task.files.is_readable()):
return None
try:
files = task.files
fd_table = files.get_fds()
if fd_table == 0:
return None

fd_table = task.files.get_fds()
if fd_table == 0:
max_fds = files.get_max_fds()
except exceptions.InvalidAddressException:
return None

max_fds = task.files.get_max_fds()

# corruption check
if max_fds > 500000:
return None
Expand Down

0 comments on commit e5e4d30

Please sign in to comment.