diff options
author | Jeff Cai <jeff.cai@sun.com> | 2005-12-01 07:33:52 +0000 |
---|---|---|
committer | Harry Lu <haip@src.gnome.org> | 2005-12-01 07:33:52 +0000 |
commit | e9801cfc41a7585f81793b0fcc698b5cb28e6245 (patch) | |
tree | 84bf4a607e3a66fa2417d6b15bd20358b3b84c30 | |
parent | 944789a4223545d1a1b59986d6ecabaef087bba9 (diff) | |
download | evolution-data-server-e9801cfc41a7585f81793b0fcc698b5cb28e6245.tar.gz |
Evolution should not send command with zero additional parameters. Fix
2005-12-01 Jeff Cai <jeff.cai@sun.com>
* camel-imap-command.c:(imap_command_strdup_vprintf):
Evolution should not send command with zero additional parameters.
Fix #322408
-rw-r--r-- | camel/providers/imap/ChangeLog | 6 | ||||
-rw-r--r-- | camel/providers/imap/camel-imap-command.c | 5 |
2 files changed, 9 insertions, 2 deletions
diff --git a/camel/providers/imap/ChangeLog b/camel/providers/imap/ChangeLog index 4d727ae99..3ecf40d2a 100644 --- a/camel/providers/imap/ChangeLog +++ b/camel/providers/imap/ChangeLog @@ -1,3 +1,9 @@ +2005-12-01 Jeff Cai <jeff.cai@sun.com> + + * camel-imap-command.c:(imap_command_strdup_vprintf): + Evolution should not send command with zero additional parameters. + Fix #322408 + 2005-10-21 Shreyas Srinivasan <sshreyas@novell.com> * camel-imap-utils.c:(imap_parse_list_response): Handle diff --git a/camel/providers/imap/camel-imap-command.c b/camel/providers/imap/camel-imap-command.c index 6c388910e..430f49dd8 100644 --- a/camel/providers/imap/camel-imap-command.c +++ b/camel/providers/imap/camel-imap-command.c @@ -824,8 +824,9 @@ imap_command_strdup_vprintf (CamelImapStore *store, const char *fmt, if (imap_is_atom (string)) { outptr += sprintf (outptr, "%s", string); } else { - if (store->capabilities & IMAP_CAPABILITY_LITERALPLUS) { - outptr += sprintf (outptr, "{%d+}\r\n%s", (int)strlen(string), string); + len = strlen (string); + if (len && store->capabilities & IMAP_CAPABILITY_LITERALPLUS) { + outptr += sprintf (outptr, "{%d+}\r\n%s", len, string); } else { char *quoted = imap_quote_string (string); |