[evolution-data-server] Bug 752339 - [POP3] Crash due to passing set GError to glib-networking
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Bug 752339 - [POP3] Crash due to passing set GError to glib-networking
- Date: Mon, 31 Aug 2015 11:50:38 +0000 (UTC)
commit 32d7e5f3dc5358d88b39e0cd4c8aa109301d2b69
Author: Milan Crha <mcrha redhat com>
Date: Mon Aug 31 13:50:06 2015 +0200
Bug 752339 - [POP3] Crash due to passing set GError to glib-networking
camel/providers/pop3/camel-pop3-engine.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/camel/providers/pop3/camel-pop3-engine.c b/camel/providers/pop3/camel-pop3-engine.c
index 376d1e0..e9b99c6 100644
--- a/camel/providers/pop3/camel-pop3-engine.c
+++ b/camel/providers/pop3/camel-pop3-engine.c
@@ -342,6 +342,8 @@ camel_pop3_engine_iterate (CamelPOP3Engine *pe,
case '+':
dd (printf ("Got + response\n"));
if (pc->flags & CAMEL_POP3_COMMAND_MULTI) {
+ gint fret;
+
pc->state = CAMEL_POP3_COMMAND_DATA;
camel_pop3_stream_set_mode (pe->stream, CAMEL_POP3_STREAM_DATA);
@@ -353,14 +355,17 @@ camel_pop3_engine_iterate (CamelPOP3Engine *pe,
pc->state = CAMEL_POP3_COMMAND_ERR;
pc->error_str = g_strdup (local_error->message);
g_propagate_error (error, local_error);
- break;
+ goto ioerror;
}
}
/* Make sure we get all data before going back to command mode */
- while (camel_pop3_stream_getd (pe->stream, &p, &len, cancellable, error) > 0)
+ while (fret = camel_pop3_stream_getd (pe->stream, &p, &len, cancellable, error), fret
0)
;
camel_pop3_stream_set_mode (pe->stream, CAMEL_POP3_STREAM_LINE);
+
+ if (fret < 0)
+ goto ioerror;
} else {
pc->state = CAMEL_POP3_COMMAND_OK;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]