mirror of
https://github.com/volatilityfoundation/volatility3.git
synced 2026-09-07 10:17:38 +02:00
Objects: Ensure string template objects return the right size.
This commit is contained in:
@@ -254,6 +254,13 @@ class String(PrimitiveObject, str):
|
||||
value = value[:value.find('\x00')]
|
||||
return value
|
||||
|
||||
class VolTemplateProxy(interfaces.objects.ObjectInterface.VolTemplateProxy):
|
||||
|
||||
@classmethod
|
||||
def size(cls, template: interfaces.objects.Template) -> int:
|
||||
"""Returns the size of the templated object."""
|
||||
return template.vol.max_length
|
||||
|
||||
|
||||
class Pointer(Integer):
|
||||
"""Pointer which points to another object."""
|
||||
|
||||
Reference in New Issue
Block a user