From 9e332dcda26ef080b5b7f57da91fe23ff65b1bfa Mon Sep 17 00:00:00 2001
From: deuce <>
Date: Wed, 15 Mar 2006 02:28:55 +0000
Subject: [PATCH] Increase the size of linebuf in quote_msg() just in case of
 many ^A... This will need to be revisited but probobly isn't the problem
 right now.

---
 src/sbbs3/js_global.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/sbbs3/js_global.c b/src/sbbs3/js_global.c
index b40a8d19c7..d63f4268f5 100644
--- a/src/sbbs3/js_global.c
+++ b/src/sbbs3/js_global.c
@@ -987,7 +987,7 @@ js_quote_msg(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
 	if(len<=0)
 		return(JS_FALSE);
 
-	if((linebuf=(char*)malloc(len+1))==NULL)
+	if((linebuf=(char*)malloc(len*2+2))==NULL)	/* (Hopefully) Room for ^A codes.  ToDo */
 		return(JS_FALSE);
 
 	outbuf[0]=0;
-- 
GitLab