summaryrefslogtreecommitdiff
path: root/botserv.c
diff options
context:
space:
mode:
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]) {