Skip to content

Memory Regions' reported paths break when the path contains whitespaces (Linux) #20

@aidanii24

Description

@aidanii24

When getting the path information from a memory region returned by process.get_memory_regions(), the returned path may be trimmed from it's full path if it contained whitespaces. According to this line, region information is obtained from proc/{pid}/mem by splitting each newline by spaces, but this also breaks the full path of the memory region if it were to contain spaces. I believe the format of all other memory region information from that file doesn't change much if at all, so this problem can be easily fixed by limiting the number of splits to 5.

region_information = line.split(maxsplit=5)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions