aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2001-01-29 17:13:17 +0800
committerMichael Zucci <zucchi@src.gnome.org>2001-01-29 17:13:17 +0800
commita5edc8ab732045dacc6d37cdccc298e47b25a0cc (patch)
treeebe8d303697577dc9b9bdfe0cc544c3d521fbfff
parentd057619fd675a74c5ddcd986737e17d79e3610d7 (diff)
downloadgsoc2013-evolution-a5edc8ab732045dacc6d37cdccc298e47b25a0cc.tar
gsoc2013-evolution-a5edc8ab732045dacc6d37cdccc298e47b25a0cc.tar.gz
gsoc2013-evolution-a5edc8ab732045dacc6d37cdccc298e47b25a0cc.tar.bz2
gsoc2013-evolution-a5edc8ab732045dacc6d37cdccc298e47b25a0cc.tar.lz
gsoc2013-evolution-a5edc8ab732045dacc6d37cdccc298e47b25a0cc.tar.xz
gsoc2013-evolution-a5edc8ab732045dacc6d37cdccc298e47b25a0cc.tar.zst
gsoc2013-evolution-a5edc8ab732045dacc6d37cdccc298e47b25a0cc.zip
Include the terminating NUL in the calculated string length. This hit
2001-01-29 Not Zed <NotZed@Ximian.com> * 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
-rw-r--r--camel/ChangeLog6
-rw-r--r--camel/providers/imap/camel-imap-command.c2
2 files changed, 7 insertions, 1 deletions
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 <NotZed@Ximian.com>
+
+ * 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 <NotZed@Ximian.com>
* 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) {