aboutsummaryrefslogtreecommitdiff
path: root/filling.c
diff options
context:
space:
mode:
Diffstat (limited to 'filling.c')
-rw-r--r--filling.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/filling.c b/filling.c
index 92939a1..7dec656 100644
--- a/filling.c
+++ b/filling.c
@@ -188,6 +188,8 @@ static const char *validate_params(const game_params *params, bool full)
{
if (params->w < 1) return "Width must be at least one";
if (params->h < 1) return "Height must be at least one";
+ if (params->w > INT_MAX / params->h)
+ return "Width times height must not be unreasonably large";
return NULL;
}