aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-mailer-prefs.c
diff options
context:
space:
mode:
authorGilles Dartiguelongue <gdartigu@src.gnome.org>2008-01-07 06:48:18 +0800
committerGilles Dartiguelongue <gdartigu@src.gnome.org>2008-01-07 06:48:18 +0800
commitfd55ab6d38130432e2bfcc3d26a2f22f0b8eac50 (patch)
tree9ad16af5abf641f452230ade0adef680e09d72dc /mail/em-mailer-prefs.c
parent45d410de1e13a91e0e41a55b442d256112b031da (diff)
downloadgsoc2013-evolution-fd55ab6d38130432e2bfcc3d26a2f22f0b8eac50.tar
gsoc2013-evolution-fd55ab6d38130432e2bfcc3d26a2f22f0b8eac50.tar.gz
gsoc2013-evolution-fd55ab6d38130432e2bfcc3d26a2f22f0b8eac50.tar.bz2
gsoc2013-evolution-fd55ab6d38130432e2bfcc3d26a2f22f0b8eac50.tar.lz
gsoc2013-evolution-fd55ab6d38130432e2bfcc3d26a2f22f0b8eac50.tar.xz
gsoc2013-evolution-fd55ab6d38130432e2bfcc3d26a2f22f0b8eac50.tar.zst
gsoc2013-evolution-fd55ab6d38130432e2bfcc3d26a2f22f0b8eac50.zip
** Fix bug #497914
* em-mailer-prefs.c: (emmp_header_is_valid): backport changes from the copy/pasted code in imap-headers plugin. svn path=/trunk/; revision=34772
Diffstat (limited to 'mail/em-mailer-prefs.c')
-rw-r--r--mail/em-mailer-prefs.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/mail/em-mailer-prefs.c b/mail/em-mailer-prefs.c
index 991c684d10..5a29b54456 100644
--- a/mail/em-mailer-prefs.c
+++ b/mail/em-mailer-prefs.c
@@ -462,17 +462,13 @@ emmp_header_remove_sensitivity (EMMailerPrefs *prefs)
static gboolean
emmp_header_is_valid (const char *header)
{
- const char *p = header;
+ gint len = g_utf8_strlen (header, -1);
- if (header[0] == 0)
+ if (header[0] == 0
+ || g_utf8_strchr (header, len, ':') != NULL
+ || g_utf8_strchr (header, len, ' ') != NULL)
return FALSE;
- while (*p) {
- if ((*p == ':') || (*p == ' '))
- return FALSE;
- p++;
- }
-
return TRUE;
}