diff src/util.c @ 8005:3bdfb4308d10

[gaim-migrate @ 8682] Fix an off-by-one in a malloc in gaim_quotedp_decode. Thanks shx :) committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Mon, 05 Jan 2004 07:08:32 +0000
parents 1b8261f374ea
children 17b90334f3cc
line wrap: on
line diff
--- a/src/util.c	Mon Jan 05 07:03:56 2004 +0000
+++ b/src/util.c	Mon Jan 05 07:08:32 2004 +0000
@@ -252,7 +252,7 @@
 {
 	char *p, *n, *new;
 
-	n = new = g_malloc(strlen (str));
+	n = new = g_malloc(strlen (str) + 1);
 
 	for (p = (char *)str; *p; p++, n++) {
 		if (*p == '=') {