diff options
author | Dan Winship <danw@src.gnome.org> | 2000-12-28 03:10:06 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2000-12-28 03:10:06 +0800 |
commit | 5f5ddfccb6dc542d5f7025f99f4f624c2796f52d (patch) | |
tree | b381b49bf92259c4a66a31f4a9a84157c4164288 /camel | |
parent | 3fa9fa84fcf6f41bf59175b9c5eb310f5f2004af (diff) | |
download | gsoc2013-evolution-5f5ddfccb6dc542d5f7025f99f4f624c2796f52d.tar.gz gsoc2013-evolution-5f5ddfccb6dc542d5f7025f99f4f624c2796f52d.tar.zst gsoc2013-evolution-5f5ddfccb6dc542d5f7025f99f4f624c2796f52d.zip |
Fix the APOP check to not crash on servers that don't return any
* providers/pop3/camel-pop3-store.c (connect_to_server): Fix the
APOP check to not crash on servers that don't return any
information on the +OK greeting line.
svn path=/trunk/; revision=7184
Diffstat (limited to 'camel')
-rw-r--r-- | camel/ChangeLog | 6 | ||||
-rw-r--r-- | camel/providers/pop3/camel-pop3-store.c | 16 |
2 files changed, 15 insertions, 7 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog index def6d5d0c2..dee6af3053 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,9 @@ +2000-12-27 Dan Winship <danw@helixcode.com> + + * providers/pop3/camel-pop3-store.c (connect_to_server): Fix the + APOP check to not crash on servers that don't return any + information on the +OK greeting line. + 2000-12-24 Not Zed <NotZed@HelixCode.com> * providers/imap/camel-imap-search.c (imap_body_contains): Lock diff --git a/camel/providers/pop3/camel-pop3-store.c b/camel/providers/pop3/camel-pop3-store.c index 2f23bf0bb2..6fc56fc125 100644 --- a/camel/providers/pop3/camel-pop3-store.c +++ b/camel/providers/pop3/camel-pop3-store.c @@ -230,14 +230,16 @@ connect_to_server (CamelService *service, /*gboolean real, */CamelException *ex) if (status != CAMEL_POP3_OK) return FALSE; - apoptime = strchr (buf, '<'); - apopend = apoptime ? strchr (apoptime, '>') : NULL; - if (apopend) { - store->apop_timestamp = g_strndup (apoptime, - apopend - apoptime + 1); - memmove (apoptime, apopend + 1, strlen (apopend + 1)); + if (buf) { + apoptime = strchr (buf, '<'); + apopend = apoptime ? strchr (apoptime, '>') : NULL; + if (apopend) { + store->apop_timestamp = + g_strndup (apoptime, apopend - apoptime + 1); + memmove (apoptime, apopend + 1, strlen (apopend + 1)); + } + store->implementation = buf; } - store->implementation = buf; /* Check extensions */ store->login_delay = -1; |