X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=src%2Fmessagehandler.c;h=4111d4980d0ba9b3dedccffab90d224cc77208c7;hb=a76733ea91c6a1d42dfbb50631fa214cc284c3bf;hp=d20ccba1504cb08f598ced4eadd4299767cf1904;hpb=8257d7bc7490052bf9d9265e16a3d43769c701e3;p=umurmur.git diff --git a/src/messagehandler.c b/src/messagehandler.c index d20ccba..4111d49 100644 --- a/src/messagehandler.c +++ b/src/messagehandler.c @@ -104,11 +104,14 @@ void Mh_handle_message(client_t *client, message_t *msg) } } if (strlen(getStrConf(PASSPHRASE)) > 0) { - if (!msg->payload.authenticate->password || strncmp(getStrConf(PASSPHRASE), msg->payload.authenticate->password, MAX_TEXT) != 0) { + if (!msg->payload.authenticate->password || + (msg->payload.authenticate->password && + strncmp(getStrConf(PASSPHRASE), msg->payload.authenticate->password, MAX_TEXT) != 0)) { char buf[64]; sprintf(buf, "Wrong server password"); sendServerReject(client, buf, MUMBLE_PROTO__REJECT__REJECT_TYPE__WrongServerPW); - Log_debug("Wrong server password: %s", msg->payload.authenticate->password); + Log_debug("Wrong server password: '%s'", msg->payload.authenticate->password != NULL ? + msg->payload.authenticate->password : "(null)"); goto disconnect; } }