From: Timo Sirainen Date: Sat, 3 May 2003 16:31:12 +0000 (+0300) Subject: If no error is set, give "BUG: Unknown error" rather than try to print NULL X-Git-Tag: 1.1.alpha1~4694 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=02335a910e08855dbe7f686b27c1c30c5c6a1d5b;p=thirdparty%2Fdovecot%2Fcore.git If no error is set, give "BUG: Unknown error" rather than try to print NULL which crashes in some systems. --HG-- branch : HEAD --- diff --git a/src/pop3/client.c b/src/pop3/client.c index c8e34d15c2..252c264715 100644 --- a/src/pop3/client.c +++ b/src/pop3/client.c @@ -189,7 +189,8 @@ void client_send_storage_error(struct client *client) const char *error; error = client->storage->get_last_error(client->storage, NULL); - client_send_line(client, "-ERR %s", error); + client_send_line(client, "-ERR %s", error != NULL ? error : + "BUG: Unknown error"); } static void client_input(void *context)