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

nvapi: Add argument checks and a few things found on the road #179

Merged
merged 3 commits into from
May 29, 2024

Conversation

jp7677
Copy link
Owner

@jp7677 jp7677 commented May 28, 2024

Also omit nullptr checks for handles.

This one is probably a bit tricky ...

@jp7677 jp7677 marked this pull request as ready for review May 29, 2024 16:22
@jp7677 jp7677 changed the title nvapi: Add argument checks nvapi: Add argument checks and a few things found on the road May 29, 2024
@jp7677 jp7677 requested a review from Saancreed May 29, 2024 16:50
Copy link
Collaborator

@Saancreed Saancreed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about NvAPI_D3D_SetSleepMode and NvAPI_D3D_GetSleepStatus? We unsafely dereference second parameter of each function. Not sure if there's anything else in that area but at least these two functions come to mind.

LGTM otherwise.

jp7677 added 3 commits May 29, 2024 19:13
Also omit nullptr checks for handles.
Passing nullptr down the stack might not be a good idea.
@jp7677 jp7677 force-pushed the invalid-arguments branch from 6b58a93 to 95f176f Compare May 29, 2024 17:16
@jp7677
Copy link
Owner Author

jp7677 commented May 29, 2024

What about NvAPI_D3D_SetSleepMode and NvAPI_D3D_GetSleepStatus? We unsafely dereference second parameter of each function. Not sure if there's anything else in that area but at least these two functions come to mind.

Thanks, missed those two and also NvAPI_D3D_GetLatency. It's (forced) pushed.

@jp7677 jp7677 merged commit 95f176f into master May 29, 2024
2 checks passed
@jp7677 jp7677 deleted the invalid-arguments branch May 31, 2024 05:45
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