]> granicus.if.org Git - neomutt/commitdiff
fix: crash in mbox_to_udomain 779/head
authorRichard Russon <rich@flatcap.org>
Sun, 24 Sep 2017 11:18:25 +0000 (12:18 +0100)
committerRichard Russon <rich@flatcap.org>
Tue, 26 Sep 2017 14:22:45 +0000 (15:22 +0100)
Fixes #778

mutt_idna.c

index 2923444f7545758f1f400b8fee518ecc10fad06d..7a956fdca5f91daf6c1842b0a975981212644a9b 100644 (file)
@@ -57,6 +57,8 @@ static int mbox_to_udomain(const char *mbx, char **user, char **domain)
   char *p = NULL;
 
   mutt_str_replace(&buff, mbx);
+  if (!buff)
+    return -1;
 
   p = strchr(buff, '@');
   if (!p || !p[1])