[evolution-kolab] CamelImapxMetadata: do not include trailing NUL in command assembly



commit 6d47a203eb29ff19b42b5e02602a5acc6e71190a
Author: Christian Hilberg <hilberg kernelconcepts de>
Date:   Tue Sep 18 18:51:46 2012 +0200

    CamelImapxMetadata: do not include trailing NUL in command assembly
    
    * when creating a new command list for metadata setting,
      do not include the trailing NUL char when copying the
      annotation data (g_string_append_len() does so by itself)
    * this is not to prematurely terminate the command string,
      as it needs to be closed properly (quotation marks and
      closing bracket need to follow the final value)

 src/libekolab/camel-imapx-metadata.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/libekolab/camel-imapx-metadata.c b/src/libekolab/camel-imapx-metadata.c
index b75e526..07426b6 100644
--- a/src/libekolab/camel-imapx-metadata.c
+++ b/src/libekolab/camel-imapx-metadata.c
@@ -697,7 +697,7 @@ camel_imapx_metadata_new_commandlist (CamelImapxMetadata *md)
 						g_string_append (cmd, "\"");
 						g_string_append_len (cmd,
 						                     (gchar *) ma->data[acc]->data,
-						                     (gssize) ma->data[acc]->len);
+						                     (gssize) ma->data[acc]->len - 1);
 						g_string_append (cmd, "\"");
 						break;
 					default:



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]