aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2002-07-25 04:48:27 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2002-07-25 04:48:27 +0800
commit6dc1e9f71f7a9e3a876f56fadec03e35e5e5e214 (patch)
tree69916698499204ee9cd3540de15c58d9bb6b0cb4 /mail
parentea1923cacfadbb726c9e776000de3a7c7c316bb6 (diff)
downloadgsoc2013-evolution-6dc1e9f71f7a9e3a876f56fadec03e35e5e5e214.tar
gsoc2013-evolution-6dc1e9f71f7a9e3a876f56fadec03e35e5e5e214.tar.gz
gsoc2013-evolution-6dc1e9f71f7a9e3a876f56fadec03e35e5e5e214.tar.bz2
gsoc2013-evolution-6dc1e9f71f7a9e3a876f56fadec03e35e5e5e214.tar.lz
gsoc2013-evolution-6dc1e9f71f7a9e3a876f56fadec03e35e5e5e214.tar.xz
gsoc2013-evolution-6dc1e9f71f7a9e3a876f56fadec03e35e5e5e214.tar.zst
gsoc2013-evolution-6dc1e9f71f7a9e3a876f56fadec03e35e5e5e214.zip
Don't pass the length of the tag name into strncmp, instead use the length
2002-07-23 Jeffrey Stedfast <fejj@ximian.com> * message-tag-followup.c (message_tag_followup_decode): Don't pass the length of the tag name into strncmp, instead use the length up to the first ':' in the value string. svn path=/trunk/; revision=17579
Diffstat (limited to 'mail')
-rw-r--r--mail/message-tag-followup.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/mail/message-tag-followup.c b/mail/message-tag-followup.c
index f546a6745d..2d855c7d7b 100644
--- a/mail/message-tag-followup.c
+++ b/mail/message-tag-followup.c
@@ -187,19 +187,23 @@ message_tag_followup_decode (const char *value)
{
struct _FollowUpTag *tag;
const char *inptr;
- int i;
+ int len, i;
tag = g_new (struct _FollowUpTag, 1);
+ inptr = strchr (value, ':');
+ if (!inptr)
+ inptr = value + strlen (value);
+
+ len = inptr - value;
+
for (i = 0; i < FOLLOWUP_FLAG_NONE; i++) {
- if (!strcmp (value, available_flags[i].name))
+ if (!strncmp (value, available_flags[i].name, len))
break;
}
tag->type = i;
- inptr = value + strlen (available_flags[i].name);
-
if (*inptr == ':') {
inptr++;
tag->target_date = strtoul (inptr, (char **) &inptr, 16);