# HG changeset patch # User Timo Sirainen # Date 1172595413 -7200 # Node ID d93207ff228032062a9319cd259b7789b220f585 # Parent 2bf812efe6a371d70a87604bbcbd666e4083913b Don't crash with invalid PLAIN input. diff -r 2bf812efe6a3 -r d93207ff2280 src/auth/mech-plain.c --- a/src/auth/mech-plain.c Sun Feb 25 17:40:38 2007 +0200 +++ b/src/auth/mech-plain.c Tue Feb 27 18:56:53 2007 +0200 @@ -50,7 +50,7 @@ } } - if (strcmp(authid, authenid) == 0) { + if (authenid != NULL && strcmp(authid, authenid) == 0) { /* the login username isn't different */ authid = ""; }