File tree Expand file tree Collapse file tree 1 file changed +4
-16
lines changed
volatility3/framework/symbols/linux/extensions Expand file tree Collapse file tree 1 file changed +4
-16
lines changed Original file line number Diff line number Diff line change @@ -3065,14 +3065,7 @@ def _do_get_name(self) -> str:
30653065 else :
30663066 raise AttributeError ("Unsupported kernel_symbol type implementation" )
30673067
3068- layer = self ._context .layers [self .vol .layer_name ]
3069- name_bytes = layer .read (name_offset , linux_constants .KSYM_NAME_LEN )
3070-
3071- idx = name_bytes .find (b"\x00 " )
3072- if idx != - 1 :
3073- name_bytes = name_bytes [:idx ]
3074-
3075- return name_bytes .decode ("utf-8" , errors = "ignore" )
3068+ return utility .pointer_to_string (name_offset , linux_constants .KSYM_NAME_LEN )
30763069
30773070 def get_name (self ) -> Optional [str ]:
30783071 try :
@@ -3108,14 +3101,9 @@ def _do_get_namespace(self) -> str:
31083101 else :
31093102 raise AttributeError ("Unsupported kernel_symbol type implementation" )
31103103
3111- layer = self ._context .layers [self .vol .layer_name ]
3112- namespace_bytes = layer .read (namespace_offset , linux_constants .KSYM_NAME_LEN )
3113-
3114- idx = namespace_bytes .find (b"\x00 " )
3115- if idx != - 1 :
3116- namespace_bytes = namespace_bytes [:idx ]
3117-
3118- return namespace_bytes .decode ("utf-8" , errors = "ignore" )
3104+ return utility .pointer_to_string (
3105+ namespace_offset , linux_constants .KSYM_NAME_LEN
3106+ )
31193107
31203108 def get_namespace (self ) -> Optional [str ]:
31213109 try :
You can’t perform that action at this time.
0 commit comments