-
Notifications
You must be signed in to change notification settings - Fork 261
Bug Fixes #320
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
Bug Fixes #320
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -189,7 +189,15 @@ static int dxcore_query_adapter_driverstore(struct dxcore_lib* pLib, unsigned in | |||||
| free(pValue); | ||||||
| return (-1); | ||||||
| } | ||||||
| wcstombs(*ppDriverStorePath, pOutput, outputSize); | ||||||
| /* | ||||||
| * 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 | ||||||
| * 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. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unresolved as this has not been addressed. |
||||||
| */ | ||||||
| wcstombs(*ppDriverStorePath, pOutput, outputSize + 1); | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As a matter of interest, is this something that you've run into?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. cc @jbujak |
||||||
|
|
||||||
| free(pValue); | ||||||
|
|
||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unresolved as this has not been addressed.