A common bug is to leave sensitive mem uncleared and reuse memory (e.g. via ’s cache) without proper initialisation, leading to secret leakage. The purpose of freezero() and recallocarray() is to protect against that threat. Big threat to the application is the application.

@otto I always use calloc lately. Do you think that's a bad idea? I never heard of these other functions (bsd only?)

(sorry if you get this toot more than once, Tusky is acting up)

@MightyPork calloc is standard C, but OpenBSD has extensions. Some other OSes have them as well see. See

Sign in to participate in the conversation
BSD Network is a *BSD-themed Mastodon Instance. General use is encouraged, and everyone is welcome as long as you follow our code of conduct!
If you wish to donate, we are on Liberapay: Donate using
LiberapayDonate using Liberapay