Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

librc: use return value of rc_getline for len instead of the buffer size #744

Merged
merged 1 commit into from
Sep 18, 2024

Conversation

navi-desu
Copy link
Member

No description provided.

@thesamesam
Copy link
Contributor

This needs a commit message.

Currently the code uses the total size of the buffer as the bounds for
looping \0 separated fields, which leads to reading uninitialized data
and possibly overrun the buffer during regexec.

Observed on musl while matching /proc/cpuinfo.
@williamh williamh merged commit 171ba6d into master Sep 18, 2024
8 checks passed
@williamh williamh deleted the file_regex_len branch September 18, 2024 17:35
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.

3 participants