ref: b090c82df1527dcf348c96765f10ab5736c68c29
parent: 6e40605f1ed4ecce400faae5b41c03995e7f862c
author: Ben Harris <bjh21@bjh21.me.uk>
date: Mon Jan 9 19:32:25 EST 2023
Also limit Pegs to at least 1x1 even when not doing full validation
--- a/pegs.c
+++ b/pegs.c
@@ -183,6 +183,8 @@
{
if (full && (params->w <= 3 || params->h <= 3))
return "Width and height must both be greater than three";
+ if (params->w < 1 || params->h < 1)
+ return "Width and height must both be at least one";
if (params->w > INT_MAX / params->h)
return "Width times height must not be unreasonably large";