diff options
| author | Ben Harris <bjh21@bjh21.me.uk> | 2023-03-31 15:33:51 +0100 |
|---|---|---|
| committer | Ben Harris <bjh21@bjh21.me.uk> | 2023-03-31 15:35:50 +0100 |
| commit | 52d801a06a804244292f4a872eeaf5e84a9f70b1 (patch) | |
| tree | 147fc2b28dae11ce0c0408a27d6308d86dd476b7 /grid.c | |
| parent | e6aa7ab6dd219d92b332c3662de95c28f7bd6b8f (diff) | |
| download | puzzles-52d801a06a804244292f4a872eeaf5e84a9f70b1.zip puzzles-52d801a06a804244292f4a872eeaf5e84a9f70b1.tar.gz puzzles-52d801a06a804244292f4a872eeaf5e84a9f70b1.tar.bz2 puzzles-52d801a06a804244292f4a872eeaf5e84a9f70b1.tar.xz | |
Require a grid description for hats grid
Without this, you can cause a null-pointer dereference by passing Loopy
a game description with no grid description, like "10x10t16:".
Diffstat (limited to 'grid.c')
| -rw-r--r-- | grid.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -3496,6 +3496,9 @@ static const char *grid_validate_desc_hats( struct HatPatchParams hp; const char *error = NULL; + if (!desc) + return "Missing grid description string."; + error = grid_desc_to_hat_params(desc, &hp); if (!error) error = hat_tiling_params_invalid(&hp); |