]> granicus.if.org Git - mutt/commitdiff
Fix some possible NULL pointer deferences in the RFC2047 code.
authorThomas Roessler <roessler@does-not-exist.org>
Mon, 10 Jul 2000 16:20:48 +0000 (16:20 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Mon, 10 Jul 2000 16:20:48 +0000 (16:20 +0000)
rfc2047.c

index 4cc43321292bf87b26d55d0f2dcc786a86ef3def..2020416e34fc69cd9e24ab6d9ce30522c4742ca8 100644 (file)
--- a/rfc2047.c
+++ b/rfc2047.c
@@ -484,7 +484,7 @@ void rfc2047_encode_string (char **pd)
   size_t elen;
   char *charsets;
 
-  if (!Charset)
+  if (!Charset || !*pd)
     return;
 
   charsets = SendCharset;
@@ -669,7 +669,7 @@ void rfc2047_decode (char **pd)
   const char *s = *pd;
   size_t dlen;
 
-  if (!*s)
+  if (!*s || !s)
     return;
 
   dlen = 4 * strlen (s); /* should be enough */