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

Is it dangerous to handle 'policy' like this? #330

Open
shlyakpavel opened this issue Aug 8, 2021 · 2 comments
Open

Is it dangerous to handle 'policy' like this? #330

shlyakpavel opened this issue Aug 8, 2021 · 2 comments

Comments

@shlyakpavel
Copy link
Member

switch (policy)

Policy is not enum. Integer may get any value and cause rb undefined. This may lead to garbage pointer dereference. My proposal is to make SCHED_OTHER default case to ensure that never happens.

@shlyakpavel
Copy link
Member Author

I'm not good enouth with this code so not making a PR now

@shlyakpavel shlyakpavel changed the title It is dangerous to handle 'policy' like this Is it dangerous to handle 'policy' like this? Aug 8, 2021
@tsujan
Copy link
Member

tsujan commented Aug 8, 2021

Yes, a default is missing.

I don't remember what was in this file; should read it again.

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

No branches or pull requests

2 participants