aboutsummaryrefslogtreecommitdiff
path: root/slant.c
diff options
context:
space:
mode:
Diffstat (limited to 'slant.c')
-rw-r--r--slant.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/slant.c b/slant.c
index 25af496..f7070d7 100644
--- a/slant.c
+++ b/slant.c
@@ -226,6 +226,8 @@ static const char *validate_params(const game_params *params, bool full)
if (params->w < 2 || params->h < 2)
return "Width and height must both be at least two";
+ if (params->w > INT_MAX / params->h)
+ return "Width times height must not be unreasonably large";
return NULL;
}