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

kernel version parsing panic #136

Closed
zz85 opened this issue Jul 28, 2021 · 2 comments · Fixed by #137
Closed

kernel version parsing panic #136

zz85 opened this issue Jul 28, 2021 · 2 comments · Fixed by #137

Comments

@zz85
Copy link
Contributor

zz85 commented Jul 28, 2021

a kernel version name like 4.9.266-0.1.ac.225.84.332.metal1.x86_64 causes procfs to panic here

https://github.com/eminence/procfs/blob/master/src/lib.rs#L303

let patch = patch.parse().map_err(|_| "Failed to parse patch version")?;

one fix is to default to 0 values, another would be to parse the first readable number

@zz85
Copy link
Contributor Author

zz85 commented Jul 28, 2021

pub patch: u8 also mean that numbers > 255 wouldn't fit

zz85 added a commit to zz85/procfs that referenced this issue Jul 28, 2021
@eminence
Copy link
Owner

Hi @zz85 and @fabricedesre. Sorry this took so long, but this fix is now released as 0.10.0.

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 a pull request may close this issue.

2 participants