Skip to content

Commit

Permalink
handle NotAvailableValue in filename
Browse files Browse the repository at this point in the history
  • Loading branch information
Abyss-W4tcher committed Dec 22, 2024
1 parent 1fef570 commit 8d21328
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions volatility3/framework/plugins/linux/graphics/fbdev.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,8 @@ def dump_fb(
"""
kernel = context.modules[kernel_name]
kernel_layer = context.layers[kernel.layer_name]
base_filename = f"{fb.id}_{fb.xres_virtual}x{fb.yres_virtual}_{fb.bpp}bpp"
id = "N-A" if isinstance(fb.id, NotAvailableValue) else fb.id
base_filename = f"{id}_{fb.xres_virtual}x{fb.yres_virtual}_{fb.bpp}bpp"
if convert_to_png_image:
image_object = cls.convert_fb_raw_buffer_to_image(context, kernel_name, fb)
raw_io_output = io.BytesIO()
Expand Down Expand Up @@ -207,8 +208,7 @@ def parse_fb_info(
- struct fb_var_screeninfo stores device independent changeable information about a frame buffer device, its current format and video mode,
as well as other miscellaneous parameters.
"""
# NotAvailableValue() messes with the filename output on disk
id = utility.array_to_string(fb_info.fix.id) or "N-A"
id = utility.array_to_string(fb_info.fix.id) or NotAvailableValue()
color_fields = None

# 0 = color, 1 = grayscale, >1 = FOURCC
Expand Down

0 comments on commit 8d21328

Please sign in to comment.