X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=mutt_idna.c;h=78fe7bee3a403366a1618330a4bc65dfdebd6127;hp=82796c838b9b5b29222c71fe2940c48cbb92e193;hb=5e53f9e5f65aa5b3af6f5af9d868403536534afb;hpb=ba5e3af4ea19e1d20c80941c077039871ec84258 diff --git a/mutt_idna.c b/mutt_idna.c index 82796c8..78fe7be 100644 --- a/mutt_idna.c +++ b/mutt_idna.c @@ -12,6 +12,7 @@ #endif #include "mutt.h" +#include "ascii.h" #include "charset.h" #include "mutt_idna.h" @@ -126,7 +127,7 @@ static int mbox_to_udomain (const char *mbx, char **user, char **domain) *domain = NULL; p = strchr (mbx, '@'); - if (!p) + if (!p || !p[1]) return -1; *user = mem_calloc ((p - mbx + 1), sizeof (mbx[0])); strfcpy (*user, mbx, (p - mbx + 1));