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

loader: Fix strcpy_s() #307

Merged
merged 3 commits into from
May 31, 2019
Merged

loader: Fix strcpy_s() #307

merged 3 commits into from
May 31, 2019

Conversation

chfast
Copy link
Member

@chfast chfast commented May 30, 2019

The strcpy_s() renamed to strcpy_sx()` to indicate it is not the one from standard library.

The strcpy_sx() now reports errors and behaves as strcpy_s() when buffer is too small (nulls the buffer). But it does not have all the checks.

Fixes #304

@chfast chfast marked this pull request as ready for review May 30, 2019 14:05
@chfast chfast requested a review from axic May 30, 2019 14:09
The implementation strcpy_s() in loader is wrong (to be fixed) and limited in comparison to strcpy_s() spec. Rename it to strcpy_sx() to indicate it is not the one from standard library.
The strcpy_sx() now reports errors and behaves as strcpy_s() when buffer is too small (nulls the buffer). But it does not have all the checks.
@chfast chfast merged commit 0f2416d into master May 31, 2019
@chfast chfast deleted the loader_strcpy_s branch May 31, 2019 10:28
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.

loader: The implementation of strcpy_s is wrong
2 participants