diff options
author | Dan Winship <danw@src.gnome.org> | 2000-07-02 06:10:22 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2000-07-02 06:10:22 +0800 |
commit | 00d1c1c3335a6d1d7cb342b77923b8869e6e631c (patch) | |
tree | a4ef46e64e70c0a9b9d8cb7e4d18e0190f7d5fa1 /camel/providers/pop3 | |
parent | 25e3c025f6d1ebfe39e3e3b68ad8c1a48883991c (diff) | |
download | gsoc2013-evolution-00d1c1c3335a6d1d7cb342b77923b8869e6e631c.tar.gz gsoc2013-evolution-00d1c1c3335a6d1d7cb342b77923b8869e6e631c.tar.zst gsoc2013-evolution-00d1c1c3335a6d1d7cb342b77923b8869e6e631c.zip |
fix the CAPA-parsing code to not get into an infinite loop.
* providers/pop3/camel-pop3-store.c (connect_to_server): fix the
CAPA-parsing code to not get into an infinite loop.
svn path=/trunk/; revision=3849
Diffstat (limited to 'camel/providers/pop3')
-rw-r--r-- | camel/providers/pop3/camel-pop3-store.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/camel/providers/pop3/camel-pop3-store.c b/camel/providers/pop3/camel-pop3-store.c index bdfe8dd36e..636172bb94 100644 --- a/camel/providers/pop3/camel-pop3-store.c +++ b/camel/providers/pop3/camel-pop3-store.c @@ -292,9 +292,9 @@ connect_to_server (CamelService *service, gboolean real, CamelException *ex) if (!strncmp (p, "IMPLEMENTATION ", 15)) { store->implementation = g_strndup (p + 15, len - 15); - } else if (!strncmp (p, "TOP", len)) + } else if (len == 3 && !strncmp (p, "TOP", 3)) store->supports_top = TRUE; - else if (!strncmp (p, "UIDL", len)) + else if (len == 4 && !strncmp (p, "UIDL", 4)) store->supports_uidl = TRUE; else if (!strncmp (p, "LOGIN-DELAY ", 12)) store->login_delay = atoi (p + 12); @@ -304,6 +304,8 @@ connect_to_server (CamelService *service, gboolean real, CamelException *ex) store->expires = TRUE; p += len; + if (*p) + p++; } g_free (buf); |