Skip to content

Various toctou fixes#5007

Open
nschloe wants to merge 2 commits intoAlexays:masterfrom
nschloe:toctou-fixes
Open

Various toctou fixes#5007
nschloe wants to merge 2 commits intoAlexays:masterfrom
nschloe:toctou-fixes

Conversation

@nschloe
Copy link
Copy Markdown
Contributor

@nschloe nschloe commented Apr 27, 2026

There were several toctou bugs, especially in battery.cpp. Waybar check 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.

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.

1 participant