aboutsummaryrefslogtreecommitdiff
path: root/rect.c
diff options
context:
space:
mode:
Diffstat (limited to 'rect.c')
-rw-r--r--rect.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/rect.c b/rect.c
index e2141fd..5115018 100644
--- a/rect.c
+++ b/rect.c
@@ -218,6 +218,8 @@ static const char *validate_params(const game_params *params, bool full)
{
if (params->w <= 0 || params->h <= 0)
return "Width and height must both be greater than zero";
+ if (params->w > INT_MAX / params->h)
+ return "Width times height must not be unreasonably large";
if (params->w*params->h < 2)
return "Grid area must be greater than one";
if (params->expandfactor < 0.0F)