[evolution-data-server/gnome-3-20] [IMAPx] Avoid crash when untagged response doesn't have a token
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server/gnome-3-20] [IMAPx] Avoid crash when untagged response doesn't have a token
- Date: Wed, 30 Nov 2016 13:50:38 +0000 (UTC)
commit af69ee8df99daed90f1e8889430ce921a97723e8
Author: Milan Crha <mcrha redhat com>
Date: Wed Nov 30 14:50:22 2016 +0100
[IMAPx] Avoid crash when untagged response doesn't have a token
Some server(s) can return untagged responses without tokens, like when
moving messages the server(s) can return "* [COPYUID 15810658 ...."
for "UID MOVE" request, which causes the crash.
camel/providers/imapx/camel-imapx-server.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/camel/providers/imapx/camel-imapx-server.c b/camel/providers/imapx/camel-imapx-server.c
index 4a2c6dd..391dcf2 100644
--- a/camel/providers/imapx/camel-imapx-server.c
+++ b/camel/providers/imapx/camel-imapx-server.c
@@ -1959,8 +1959,10 @@ imapx_untagged (CamelIMAPXServer *is,
e (is->priv->tagprefix, "Have token '%s' id %lu\n", is->priv->context->token, is->priv->context->id);
p = is->priv->context->token;
- while ((c = *p))
+ while (p && *p) {
+ c = *p;
*p++ = g_ascii_toupper ((gchar) c);
+ }
token = (const gchar *) is->priv->context->token; /* FIXME need 'guchar *token' here */
while (token != NULL) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]