Skip to content

Various toctou fixes#5007

Merged
Alexays merged 2 commits into
Alexays:masterfrom
nschloe:toctou-fixes
May 3, 2026
Merged

Various toctou fixes#5007
Alexays merged 2 commits into
Alexays:masterfrom
nschloe:toctou-fixes

Conversation

@nschloe
Copy link
Copy Markdown
Contributor

@nschloe nschloe commented Apr 27, 2026

There are several toctou bugs, especially in battery.cpp. Waybar checks if a file exists, then after that opens it. If the file disappears in the time between the check and the open/read, Waybar will crash. This fixes many of those bugs by removing the exists() check, and simply trying to read file. If it fails, continue.

@Alexays Alexays merged commit 4c105f7 into Alexays:master May 3, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants