summaryrefslogtreecommitdiff
path: root/botserv.c
diff options
context:
space:
mode:
authoratoledo atoledo@31f1291d-b8d6-0310-a050-a5561fc1590b <atoledo atoledo@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2004-05-05 15:53:46 +0000
committeratoledo atoledo@31f1291d-b8d6-0310-a050-a5561fc1590b <atoledo atoledo@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2004-05-05 15:53:46 +0000
commitff8b395693fa418b07a31cc3205a372148a698ee (patch)
tree618ad1747144c98b5d0874900811e2f9d953ec29 /botserv.c
parent2bf5802671a9d49c86daf11ed7dc6ae8a0f078af (diff)
BUILD : 1.7.2 (86) BUGS : NOTES : Changed the allocation of buffer for normalizeBuffer yet again
git-svn-id: svn://svn.anope.org/anope/trunk@86 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@62 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'botserv.c')
-rw-r--r--botserv.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/botserv.c b/botserv.c
index c4c96fdff..4dd86f1cf 100644
--- a/botserv.c
+++ b/botserv.c
@@ -2530,9 +2530,8 @@ char *normalizeBuffer(char *buf)
char *newbuf;
int i, len, j = 0;
- newbuf = (char *) malloc(BUFSIZE);
-
len = strlen(buf);
+ newbuf = (char *) malloc((len + 1) * sizeof(char));
for (i = 0; i < len; i++) {
switch (buf[i]) {