summaryrefslogtreecommitdiffstatshomepage
path: root/unix/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'unix/main.c')
-rw-r--r--unix/main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/unix/main.c b/unix/main.c
index 84570eb9f6..93156d66e6 100644
--- a/unix/main.c
+++ b/unix/main.c
@@ -375,6 +375,10 @@ STATIC void pre_process_options(int argc, char **argv) {
if (word_adjust) {
heap_size = heap_size * BYTES_PER_WORD / 4;
}
+ // If requested size too small, we'll crash anyway
+ if (heap_size < 700) {
+ goto invalid_arg;
+ }
#endif
} else {
invalid_arg: