Linux: update kernel_symbol extensions _do_get_name and _do_get_namespace to use errors='ignore' to match previous implimentation

This commit is contained in:
eve
2025-04-25 16:52:48 +01:00
parent 2d1acaca51
commit 2d80f4680e
@@ -3065,7 +3065,9 @@ class kernel_symbol(objects.StructType):
else:
raise AttributeError("Unsupported kernel_symbol type implementation")
return utility.pointer_to_string(name_offset, linux_constants.KSYM_NAME_LEN)
return utility.pointer_to_string(
name_offset, linux_constants.KSYM_NAME_LEN, errors="ignore"
)
def get_name(self) -> Optional[str]:
try:
@@ -3102,7 +3104,7 @@ class kernel_symbol(objects.StructType):
raise AttributeError("Unsupported kernel_symbol type implementation")
return utility.pointer_to_string(
namespace_offset, linux_constants.KSYM_NAME_LEN
namespace_offset, linux_constants.KSYM_NAME_LEN, errors="ignore"
)
def get_namespace(self) -> Optional[str]: