Skip to content

NetBSD has explicit_memset(), not explicit_bzero() - #5

Merged
jedisct1 merged 1 commit into
ipcrypt-std:mainfrom
tih:netbsd-explicit-memset
Oct 29, 2026
Merged

jedisct1 merged 1 commit into
ipcrypt-std:mainfrom
tih:netbsd-explicit-memset

Conversation

@tih

@tih tih commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

There is an assumption in the code that NetBSD, like the other major BSD variants, has an implementation of explicit_bzero() in its standard library. This is incorrect; NetBSD has explicit_memset() (with memset_explicit() as an alias), as a more general function.

This patch adds support for explicit_memset(), using ifdef to support EXPLICIT_MEMSET the same way EXPLICIT_BZERO is already supported, and defaulting to enabling it on NetBSD. At the same time, the erroneous default enabling of the use of explicit_bzero() on NetBSD is removed.

@jedisct1

Copy link
Copy Markdown
Collaborator

Thank you!

@jedisct1
jedisct1 merged commit ad8ce7a into ipcrypt-std:main Oct 29, 2026
9 checks passed
@tih
tih deleted the netbsd-explicit-memset branch October 29, 2026 19:42
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.

2 participants