From ee8bdcc09c6f3ff7fa51d437e56a390a18fd095d Mon Sep 17 00:00:00 2001 From: Thomas Roessler Date: Thu, 18 May 2000 10:18:08 +0000 Subject: [PATCH] Catch a segmentation fault in mutt_convert_string (). --- charset.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/charset.c b/charset.c index 30296275..792229b2 100644 --- 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; -- 2.40.0