diff options
author | David Woodhouse <David.Woodhouse@intel.com> | 2010-06-21 11:08:59 +0100 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2010-06-28 13:02:12 +0100 |
commit | 604a375462a145f76b7f43fe2da6ba37cfbfeab0 (patch) | |
tree | 195701625910923a58ce77247a7789a23cd0e6f6 | |
parent | 82298b9b058a4307024d9094090a9ed3ef060654 (diff) | |
download | evolution-data-server-604a375462a145f76b7f43fe2da6ba37cfbfeab0.tar.gz |
NUL-terminate literal strings when tokenising
(cherry picked from commit 8f7c68e2b108da7059e8aaba00f78ea0abc773e0)
-rw-r--r-- | camel/providers/imapx/camel-imapx-stream.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/camel/providers/imapx/camel-imapx-stream.c b/camel/providers/imapx/camel-imapx-stream.c index 076bbea89..9d5f8dfe7 100644 --- a/camel/providers/imapx/camel-imapx-stream.c +++ b/camel/providers/imapx/camel-imapx-stream.c @@ -303,6 +303,7 @@ camel_imapx_stream_astring(CamelIMAPXStream *is, guchar **data, CamelException * memcpy(p, start, inlen); p += inlen; } while (ret > 0); + *p = 0; *data = is->tokenptr; return 0; case IMAPX_TOK_ERROR: @@ -341,6 +342,7 @@ camel_imapx_stream_nstring(CamelIMAPXStream *is, guchar **data, CamelException * memcpy(p, start, inlen); p += inlen; } while (ret > 0); + *p = 0; *data = is->tokenptr; return 0; case IMAPX_TOK_TOKEN: |