From a5edc8ab732045dacc6d37cdccc298e47b25a0cc Mon Sep 17 00:00:00 2001 From: Not Zed Date: Mon, 29 Jan 2001 09:13:17 +0000 Subject: Include the terminating NUL in the calculated string length. This hit 2001-01-29 Not Zed * providers/imap/camel-imap-command.c (imap_command_strdup_vprintf): Include the terminating NUL in the calculated string length. This hit memcheck. svn path=/trunk/; revision=7884 --- camel/ChangeLog | 6 ++++++ camel/providers/imap/camel-imap-command.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'camel') diff --git a/camel/ChangeLog b/camel/ChangeLog index 2f5dbaf1ee..fcaa28014e 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,9 @@ +2001-01-29 Not Zed + + * providers/imap/camel-imap-command.c + (imap_command_strdup_vprintf): Include the terminating NUL in the + calculated string length. This hit memcheck. + 2001-01-25 Not Zed * tests/folder/test3.c: Changed the subject search to handle case diff --git a/camel/providers/imap/camel-imap-command.c b/camel/providers/imap/camel-imap-command.c index db8cdd29dd..8a713cde8b 100644 --- a/camel/providers/imap/camel-imap-command.c +++ b/camel/providers/imap/camel-imap-command.c @@ -530,7 +530,7 @@ imap_command_strdup_vprintf (CamelImapStore *store, const char *fmt, } /* Now write out the string */ - op = out = g_malloc (len); + op = out = g_malloc (len + 1); p = start = fmt; i = 0; while (*p) { -- cgit v1.2.3