1
0
mirror of https://github.com/openbsd/src.git synced 2026-06-18 23:33:33 +02:00

vs_split() uses sp's visual map without checking it exists.

OK millert
This commit is contained in:
renaud
2026-04-22 15:54:08 +00:00
parent 265ba2061d
commit 79912e7c2c
+7 -1
View File
@@ -1,4 +1,4 @@
/* $OpenBSD: vs_split.c,v 1.18 2026/04/20 10:30:02 tb Exp $ */
/* $OpenBSD: vs_split.c,v 1.19 2026/04/22 15:54:08 renaud Exp $ */
/*-
* Copyright (c) 1993, 1994
@@ -43,6 +43,12 @@ vs_split(SCR *sp, SCR *new, int ccl)
gp = sp->gp;
/* Source screen must have a visual map to split. */
if (VIP(sp) == NULL || _HMAP(sp) == NULL) {
msgq(sp, M_ERR, "Not in visual mode: cannot split screen");
return (1);
}
/* Check to see if it's possible. */
/* XXX: The IS_ONELINE fix will change this, too. */
if (sp->rows < 4) {