]> granicus.if.org Git - neomutt/commitdiff
libemail: fix rfc2231 code for degenerate cases
authorRichard Russon <rich@flatcap.org>
Mon, 29 Apr 2019 13:57:30 +0000 (14:57 +0100)
committerRichard Russon <rich@flatcap.org>
Tue, 30 Apr 2019 10:22:04 +0000 (11:22 +0100)
email/rfc2231.c

index c4f25b376f33e719c5ad52cd96a5adbd1d4e9e20..363b7d9665d4328a809c207ca46e090a2ae03409 100644 (file)
@@ -322,6 +322,9 @@ void rfc2231_decode_parameters(struct ParameterList *p)
  */
 int rfc2231_encode_string(char **pd)
 {
+  if (!pd || !*pd)
+    return 0;
+
   int ext = 0;
   bool encode = false;
   char *charset = NULL, *s = NULL, *t = NULL, *e = NULL, *d = NULL;