missing includes, intializers, consts
[apps/madmutt.git] / mutt_idna.c
index fd292f3..06c2ecd 100644 (file)
@@ -127,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));
@@ -248,7 +248,7 @@ void mutt_env_to_local (ENVELOPE * e)
      if (tag) *tag = #a; e = 1; err = NULL; \
   }
 
-int mutt_env_to_idna (ENVELOPE * env, char **tag, char **err)
+int mutt_env_to_idna (ENVELOPE * env, const char **tag, const char **err)
 {
   int e = 0;