safe_memset() wasn't safe with modern compilers anymore.
Another try based on David Jacobson's code in
https://www.mail-archive.com/openssl-dev@openssl.org/msg34134.html :

"""
Since vs points to a volatile, the load in the while clause actually has to
be done. That forces the compiler to actually store c into at least the byte
that is tested, in practice byte zero. But the fact that the index is
volatile zero, and since it is volatile it could spontaneously change to
anything, the compiler has to store c into all bytes.

The key observation is that while you can't pass a volatile to memset (you
get a warning and the volatile gets stripped away), you can use a volatile
in a test that could go the wrong way if the memset were elided.
"""
virtual: Delay initializing search args until the mailbox is actually opened.
Fixes assert-crash caused by recent changes when virtual mailbox search args
contained e.g. keywords.
virtual: Fixed assert-crash in IDLE caused by earlier changes.
This change negates all the improvements of the earlier changes when IDLE is
used. This could be fixed by using mailbox-list-notify.h API.
Added o_stream_get_max_buffer_size()
dsync: When initializing via doveadm-server, change the iostream buffer sizes to unlimited.
dsync: Added assert
doveadm replicator replicate: -p parameter wasn't working correctly.
We were just replicating the "-p" as the username.
doveadm replicator replicate: Added -f parameter to force a full sync for user.
director: When logging about request timeout, log also the username hash.
doveadm director map: Show also the username hash.
doveadm director map: Added -h and -u parameters to quickly map between username and hash.
doveadm director map -u: Don't connect to director socket, it's not needed.
director: Fixed handling weak users when there were exactly 2 director servers in the ring.
i_stream_read_next_line(): Set also errno=ENOBUFS on too large line.
Some callers assume that errno is set to same as istream->stream_errno
dsync: Fixed high data stack memory usage
dsync: If a parent \Noselect gets autocreated, don't fail later when trying to re-create it.
lib-lda: Removed unused mail_send_forward()
lib-http: Added more information to "stream input size changed" error
safe_memset(size=0) triggered read access to data[0], possibly crashing.
lib-lda: Added new smtp_client_init/deinit() APIs
The new API allows better error handling.