mail_cache_open_or_create_path called with null path

Stuart Henderson stu at spacehopper.org
Thu Aug 13 15:14:43 EEST 2020

Originally reported here -

OpenBSD's printf functions have a (mostly annoying but occasionally
useful) feature where they generate a syslog entry if printf %s format
is called with a null pointer.

It is tripped in lmtp/lda deliveries with

lmtp: vfprintf %s NULL in "Cache %s: "
dovecot-lda: vfprintf %s NULL in "Cache %s: "

557 struct mail_cache *
558 mail_cache_open_or_create_path(struct mail_index *index, const char *path)
559 {
565         cache->filepath = i_strdup(path);
572         event_set_append_log_prefix(cache->event,
573                 t_strdup_printf("Cache %s: ", cache->filepath);

Seems something is wrong to have this function called with no cache path?

More information about the dovecot mailing list