From aaf7702b14b27a87893cbe0d4c61c02947f86232 Mon Sep 17 00:00:00 2001
From: deuce <>
Date: Thu, 7 Feb 2013 01:04:47 +0000
Subject: [PATCH] Report an exception if the malloc() fails. The calling code
 must check JS_IsExceptionPending(cx) and return JS_FALSE

---
 src/sbbs3/sbbs.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/sbbs3/sbbs.h b/src/sbbs3/sbbs.h
index 7b9647a107..db9bca86c1 100644
--- a/src/sbbs3/sbbs.h
+++ b/src/sbbs3/sbbs.h
@@ -128,6 +128,7 @@ extern int	thread_suid_broken;			/* NPTL is no longer broken */
 					(ret)[JSSTSpos]=(char)JSSTSstrval[JSSTSpos]; \
 				(ret)[*JSSTSlenptr]=0; \
 			} \
+			else JS_ReportError(cx, "Error alocating %lu bytes at %s:%d", (*JSSTSlenptr)+1, getfname(__FILE__), __LINE__); \
 		} \
 	} \
 }
-- 
GitLab