Prevent further segmentation faults in parse.c
Some critical parts in parse.c depend on parseable data in
message->user and message->email. These values will never be NULL
and will never again result in a segmentation fault.
committer: Markus Bröker <mbroeker@largo.homelinux.org>
--- a/src/parse.c
+++ b/src/parse.c
@@ -80,6 +80,15 @@
struct tm *timeptr;
/*
+ * make sure that parseable data is available
+ * this prevents a possible segmentation fault
+ */
+ if (message->user == NULL)
+ message->user = "error";
+ if (message->email == NULL)
+ message->email = "server.err";
+
+ /*
* default message
*/
snprintf (msg, sizeof (msg), "PRIVMSG %s :%s.\r\n", message->channel, gettext ("Request cannot be performed"));