From 7405be7fa7134c260e5f6c4521c5877e3ebfa4ef Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Mon, 28 Sep 2026 10:32:12 +0100 Subject: [PATCH] Check for v1 bounds checks. (cherry picked from commit ef712916f6038a344bc64f99d039b3c46888730a) --- regress/layout-custom.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/regress/layout-custom.sh b/regress/layout-custom.sh index 6fc7f76d4..d6e5ae664 100644 --- a/regress/layout-custom.sh +++ b/regress/layout-custom.sh @@ -595,6 +595,12 @@ check_layout_fail "${good%%,*},80x24,0,1" check_layout_fail "$(v1 '80x24')" check_layout_fail "$(v1 '80x24,0,0[80x11,0,0,80x12,0,12}')" +# Version 1 cell sizes and offsets have the same limits as version 2. In +# particular, a width which overflows an unsigned integer must be rejected +# before it can be used to resize a pane. +check_layout_fail \ + "$(v1 '80x24,0,0{20x24,0,0,39999999999999999999999999999x24,21,0}')" + # Fewer cells than the window has panes; unlike the other way around this # cannot be fixed up. check_layout_fail '{"V":2,"L":{"t":"p","w":80,"h":24,"x":0,"y":0,"i":0,"I":"'"$q0"'"}}'