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

tool_doswin: simplify; remove unused options and strncpy calls #15047

Closed
wants to merge 1 commit into from

Conversation

bagder
Copy link
Member

@bagder bagder commented Sep 26, 2024

SANITIZE_ALLOW_TRUNCATE and SANITIZE_ALLOW_COLONS were never used by code, thus only making the code complicated for no good use.

Since nothing should truncate, using strncpy() is wrong.

Two cases of malloc + copy replaced with proper strdup() calls.

Fixup unit test 1604 accordingly.

@github-actions github-actions bot added the tests label Sep 26, 2024
@bagder bagder changed the title tool_doswin: simply; remove unused options and strncpy calls tool_doswin: simplify; remove unused options and strncpy calls Sep 26, 2024
@dfandrich

This comment was marked as outdated.

SANITIZE_ALLOW_TRUNCATE and SANITIZE_ALLOW_COLONS were never used by
code, thus only making the code complicated for no good use.

Since nothing should truncate, using strncpy() is wrong.

Two cases of malloc + copy replaced with proper strdup() calls.

Fixup unit test 1604 accordingly.

Closes #15047
@bagder bagder closed this in f383a17 Sep 26, 2024
@bagder bagder deleted the bagder/doswin-simplify branch September 26, 2024 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants