Mercurial > dovecot > original-hg > dovecot-1.2
changeset 2945:e9d9fb39cf9e HEAD
Crashfix for passdb cache. Patch by Andrey Panin.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Mon, 06 Dec 2004 18:55:57 +0200 |
parents | cd436a43dfd3 |
children | 06413236d3b1 |
files | src/auth/mech.c |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/auth/mech.c Mon Dec 06 18:46:49 2004 +0200 +++ b/src/auth/mech.c Mon Dec 06 18:55:57 2004 +0200 @@ -259,7 +259,8 @@ if (passdb_cache != NULL && cache_key != NULL) { str = t_str_new(64); - str_append_str(str, extra->str); + if (extra->str != NULL) + str_append_str(str, extra->str); if (extra->request->no_failure_delay) { if (str_len(str) > 0) str_append_c(str, '\t'); @@ -267,7 +268,8 @@ } auth_cache_insert(passdb_cache, extra->request, cache_key, t_strconcat(extra->password == NULL ? "" : - extra->password, "\t", + extra->password, + str_len(str) > 0 ? "\t" : "", str_c(str), NULL)); }