shithub: libmujs

Download patch

ref: 7c7a9cd78f339b754cc3d6a8d97b2b71845c7024
parent: 4484271999bcded9ada0a76a5706235ca43b96e1
author: Tor Andersson <tor.andersson@artifex.com>
date: Wed Apr 27 11:54:52 EDT 2016

Oops! Forgot to use the allocator in a few places...

--- a/jsarray.c
+++ b/jsarray.c
@@ -127,7 +127,7 @@
 			strcpy(out, r);
 		} else {
 			n += seplen;
-			out = realloc(out, n);
+			out = js_realloc(J, out, n);
 			strcat(out, sep);
 			strcat(out, r);
 		}
--- a/jsstring.c
+++ b/jsstring.c
@@ -120,7 +120,7 @@
 	for (i = 1; i < top; ++i) {
 		s = js_tostring(J, i);
 		n += strlen(s);
-		out = realloc(out, n + 1);
+		out = js_realloc(J, out, n + 1);
 		strcat(out, s);
 	}