summaryrefslogtreecommitdiff
path: root/run.c
diff options
context:
space:
mode:
Diffstat (limited to 'run.c')
-rw-r--r--run.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/run.c b/run.c
index ac25d23..85e2793 100644
--- a/run.c
+++ b/run.c
@@ -85,7 +85,7 @@ char *run(int count, char **progs[], size_t inputlen, char *inputstr, size_t *ou
// if the program produces too much data, you will be killed
size_t readed = 0;
- size_t cap = 1024*1024;
+ size_t cap = 2048;
char *buf = CKN(malloc(cap*sizeof(char)));
size_t remaining = cap;
size_t amt = 0;
@@ -172,6 +172,7 @@ finish:
free(argvs);
}
free(outbuf);
+
if (fail) return lua_error(L);
return 1;
}