[evolution-data-server/gnome-2-32] [IMAPX] Crash on QRESYNC line formatting on 32bit platform
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server/gnome-2-32] [IMAPX] Crash on QRESYNC line formatting on 32bit platform
- Date: Mon, 18 Oct 2010 14:47:27 +0000 (UTC)
commit b1b37cd9c0154e8ae5c025faa193bdec663a4aba
Author: Milan Crha <mcrha redhat com>
Date: Mon Oct 18 16:46:19 2010 +0200
[IMAPX] Crash on QRESYNC line formatting on 32bit platform
camel/providers/imapx/camel-imapx-server.c | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/camel/providers/imapx/camel-imapx-server.c b/camel/providers/imapx/camel-imapx-server.c
index cf417fc..042f506 100644
--- a/camel/providers/imapx/camel-imapx-server.c
+++ b/camel/providers/imapx/camel-imapx-server.c
@@ -578,7 +578,7 @@ imapx_command_addv(CamelIMAPXCommand *ic, const gchar *fmt, va_list ap)
left = FALSE;
fill = FALSE;
zero = FALSE;
- llong = FALSE;
+ llong = 0;
do {
c = *p++;
@@ -598,8 +598,8 @@ imapx_command_addv(CamelIMAPXCommand *ic, const gchar *fmt, va_list ap)
break;
} while ((c = *p++));
- if (c == 'l') {
- llong = TRUE;
+ while (c == 'l') {
+ llong++;
c = *p++;
}
@@ -693,12 +693,18 @@ imapx_command_addv(CamelIMAPXCommand *ic, const gchar *fmt, va_list ap)
break;
case 'd': /* int/unsigned */
case 'u':
- if (llong) {
+ if (llong == 1) {
l = va_arg(ap, glong);
c(printf("got glong '%d'\n", (gint)l));
memcpy(buffer, start, p-start);
buffer[p-start] = 0;
camel_stream_printf((CamelStream *)ic->mem, buffer, l);
+ } else if (llong == 2) {
+ guint64 i64 = va_arg (ap, guint64);
+ c(printf("got guint64 '%d'\n", (gint)i64));
+ memcpy (buffer, start, p-start);
+ buffer[p-start] = 0;
+ camel_stream_printf ((CamelStream *)ic->mem, buffer, i64);
} else {
d = va_arg(ap, gint);
c(printf("got gint '%d'\n", d));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]