]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
If no error is set, give "BUG: Unknown error" rather than try to print NULL
authorTimo Sirainen <tss@iki.fi>
Sat, 3 May 2003 16:31:12 +0000 (19:31 +0300)
committerTimo Sirainen <tss@iki.fi>
Sat, 3 May 2003 16:31:12 +0000 (19:31 +0300)
which crashes in some systems.

--HG--
branch : HEAD

src/pop3/client.c

index c8e34d15c2821b5601328c66342e7934f234ab44..252c2647152327c011ac84036426060452c5b7ea 100644 (file)
@@ -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)