]> granicus.if.org Git - mutt/commitdiff
Catch a segmentation fault in mutt_convert_string ().
authorThomas Roessler <roessler@does-not-exist.org>
Thu, 18 May 2000 10:18:08 +0000 (10:18 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Thu, 18 May 2000 10:18:08 +0000 (10:18 +0000)
charset.c

index 302962751c92d3b046cc901767c110a393e0d079..792229b2f0c615dfcd9d1099bfe979378a16dcc4 100644 (file)
--- a/charset.c
+++ b/charset.c
@@ -387,6 +387,9 @@ int mutt_convert_string (char *s, size_t len, const char *from, const char *to)
   iconv_t cd;
   const char *repls[] = { "\357\277\275", "?", 0 };
 
+  if (!s || !*s)
+    return 0;
+
   if (to && from && (cd = mutt_iconv_open (to, from)) != (iconv_t)-1) 
   {
     int n;