diff options
Diffstat (limited to 'untangle.c')
| -rw-r--r-- | untangle.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -31,6 +31,7 @@ #include <string.h> #include <assert.h> #include <ctype.h> +#include <limits.h> #include <math.h> #include "puzzles.h" @@ -206,6 +207,8 @@ static const char *validate_params(const game_params *params, bool full) { if (params->n < 4) return "Number of points must be at least four"; + if (params->n > INT_MAX / 3) + return "Number of points must not be unreasonably large"; return NULL; } |