[evolution-data-server] [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] [IMAPx] Avoid crash when untagged response doesn't have a token
- Date: Mon, 31 Oct 2016 18:02:57 +0000 (UTC)
commit 851efe60453e4d4136dcf0c367899d040bbb5c46
Author: Milan Crha <mcrha redhat com>
Date: Mon Oct 31 18:59:46 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.
src/camel/providers/imapx/camel-imapx-server.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/camel/providers/imapx/camel-imapx-server.c b/src/camel/providers/imapx/camel-imapx-server.c
index 6fcaf69..5665ad7 100644
--- a/src/camel/providers/imapx/camel-imapx-server.c
+++ b/src/camel/providers/imapx/camel-imapx-server.c
@@ -1957,8 +1957,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]