Skip to content

tmpnam security mitigations - #57

Merged
mircomir merged 1 commit into
masterfrom
remove_tmpnam
Sep 2, 2026
Merged

tmpnam security mitigations#57
mircomir merged 1 commit into
masterfrom
remove_tmpnam

Conversation

@mircomir

@mircomir mircomir commented Sep 2, 2026

Copy link
Copy Markdown
Owner

Security mitigation for #46

  • Use a local buffer instead of its internal one
  • Fail to open file if it exists (requires C11)

There remains a warning about using the deprecated tmpnam function, but when compiled with C11, it should be safe.

@mircomir
mircomir merged commit 16db741 into master Sep 2, 2026
4 checks passed
@mircomir
mircomir deleted the remove_tmpnam branch September 2, 2026 10:09
@mircomir

mircomir commented Sep 2, 2026

Copy link
Copy Markdown
Owner Author

To use fopen's "x" mode, I used what is reported on cppreference

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.

1 participant