8000 linux: Make syscall-trace strings valid UTF-8 by washedbeast · Pull Request #1285 · frida/frida-core · GitHub
[go: up one dir, main page]

Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/linux/linux-host-session.vala
Original file line number Diff line number Diff line change
Expand Up @@ -2894,7 +2894,7 @@ namespace Frida {
},
module_list => {
foreach (var path in module_list)
modules.add_value (new Variant.variant (new Variant.tuple ({ path })));
modules.add_value (new Variant.variant (new Variant.tuple ({ path.make_valid () })));
});

vardict_add (reply, "modules", modules.end ());
Expand Down Expand Up @@ -3111,7 +3111,7 @@ namespace Frida {

switch (attachment_type) {
case SyscallTracer.AttachmentType.STRING:
return (string) data;
return ((string) data).make_valid ();
case SyscallTracer.AttachmentType.BYTES: {
if (arg_type != null) {
Variant? v = try_decode_timespec (arg_type, data, len);
Expand Down Expand Up @@ -3208,7 +3208,7 @@ namespace Frida {
if (name_len != 0)
Memory.copy (str, path + 1, name_len);

return new Variant.tuple ({ "unix-abstract", (string) str });
return new Variant.tuple ({ "unix-abstract", ((string) str).make_valid () });
}

size_t n = 1;
Expand All @@ -3218,7 +3218,7 @@ namespace Frida {
var str = new uint8[n + 1];
Memory.copy (str, path, n);

return new Variant.tuple ({ "unix", (string) str });
return new Variant.tuple ({ "unix", ((string) str).make_valid () });
}
default:
return null;
Expand Down
0