Bug Fixes#320
Closed
starlightretailceo wants to merge 3 commits intoNVIDIA:mainfrom
Closed
Conversation
…codebase Fix driver store path string termination
elezar
reviewed
Sep 29, 2025
| * length equals `outputSize`. Use the full buffer size here to ensure | ||
| * the resulting string is always NUL terminated. | ||
| */ | ||
| wcstombs(*ppDriverStorePath, pOutput, outputSize + 1); |
Member
There was a problem hiding this comment.
As a matter of interest, is this something that you've run into?
elezar
reviewed
Sep 29, 2025
| * room for the terminating NUL byte. Passing only `outputSize` could | ||
| * prevent the terminator from being written when the converted string | ||
| * length equals `outputSize`. Use the full buffer size here to ensure | ||
| * the resulting string is always NUL terminated. |
Member
There was a problem hiding this comment.
Suggested change
| * the resulting string is always NUL terminated. | |
| * the resulting string is always NULL terminated. |
Contributor
There was a problem hiding this comment.
Unresolved as this has not been addressed.
elezar
reviewed
Sep 29, 2025
| /* | ||
| * wcstombs() expects the size of the destination buffer in bytes. The | ||
| * buffer allocated above is `outputSize + 1` bytes long, which includes | ||
| * room for the terminating NUL byte. Passing only `outputSize` could |
Member
There was a problem hiding this comment.
Suggested change
| * room for the terminating NUL byte. Passing only `outputSize` could | |
| * room for the terminating NULL byte. Passing only `outputSize` could |
Contributor
There was a problem hiding this comment.
Unresolved as this has not been addressed.
Member
|
Also, please sign-off your commit as per the DCO. |
Contributor
|
@starlightretailceo your contribution is appreciated, but we cannot accept it in its current form.
If you are able to reproduce a bug on a WSL2 machine, please file an issue first with as much detail as you can. We can iterate from there and potentially revisit this bug. For now I am closing. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request fixes a potential bug in the
dxcore_query_adapter_driverstorefunction to ensure proper handling of string termination during conversion.Bug Fix:
wcstombsfunction call to useoutputSize + 1instead ofoutputSizeto account for the NUL terminator, ensuring the resulting string is always properly terminated.