Skip to content

Fix crash with process_read_proc_file and uninitialised var - #3

Merged
WillyJL merged 5 commits into
WillyJL:devfrom
pscherz:dev
Mar 10, 2026
Merged

Fix crash with process_read_proc_file and uninitialised var#3
WillyJL merged 5 commits into
WillyJL:devfrom
pscherz:dev

Conversation

@pscherz

@pscherz pscherz commented Nov 24, 2025

Copy link
Copy Markdown
Contributor

When process_read_proc_file returns NULL there was a problem later on with uninitialized memory, resulting in a crash. Easily reproducible on bazzite 43 by just opening the process list dialog and trying to exit it by pressing either cancel or ok. Reproducible with and without sudo.

Rebuilt the Process struct to reduce extra heap allocs and make sure there is always a string to copy to.

Also resized other string arrays to powers of 2 for better memory locality (which probably doesn't matter).

Fixes #4

When `process_read_proc_file` returns NULL
there was a problem later on with uninitialized
memory.

Rebuilt  the Process struct to reduce extra heap allocs
and make sure there is always a string to copy to.
@BloodBlight

Copy link
Copy Markdown

Confirmed, this fix worked for me!

@WillyJL WillyJL added the bug Something isn't working label Mar 10, 2026
@WillyJL

WillyJL commented Mar 10, 2026

Copy link
Copy Markdown
Owner

thanks for the pr!

@WillyJL
WillyJL merged commit 2e73f54 into WillyJL:dev Mar 10, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pressing "Attach Process" crashes program

3 participants