From fbb4003a3224a6fc24f0a872b0b4253d778697c3 Mon Sep 17 00:00:00 2001 From: Andrew Case Date: Sat, 15 Mar 2025 20:59:14 +0000 Subject: [PATCH] Fix broken truncation from Vol3 bytes to string conversion --- volatility3/framework/objects/utility.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/volatility3/framework/objects/utility.py b/volatility3/framework/objects/utility.py index 018b4a138..473c5a349 100644 --- a/volatility3/framework/objects/utility.py +++ b/volatility3/framework/objects/utility.py @@ -188,7 +188,7 @@ def bytes_to_decoded_string( ) # cut at terminating byte, if found - data = data[:idx] + data = bytes(full_decoded_string[:idx], encoding=encoding) # return with caller-specified encoding and errors return data.decode(encoding=encoding, errors=errors)