From: John Marriott Date: Mon, 6 Apr 2026 13:07:31 +0000 (+0000) Subject: patch 9.2.0309: Missing out-of-memory check to may_get_cmd_block() X-Git-Tag: v9.2.0309^0 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4368ad34df6d993f0deea6242bdabb1e56299fa0;p=thirdparty%2Fvim.git patch 9.2.0309: Missing out-of-memory check to may_get_cmd_block() Problem: Missing out-of-memory check to may_get_cmd_block() Solution: Return p unchanged in case of out-of-memory (John Marriott) closes: #19906 Signed-off-by: John Marriott Signed-off-by: Christian Brabandt --- diff --git a/src/usercmd.c b/src/usercmd.c index c151261ec0..cef1d18b79 100644 --- a/src/usercmd.c +++ b/src/usercmd.c @@ -1240,6 +1240,8 @@ may_get_cmd_block(exarg_T *eap, char_u *p, char_u **tofree, int *flags) } vim_free(line); retp = *tofree = ga_concat_strings(&ga, "\n"); + if (retp == NULL) + retp = p; ga_clear_strings(&ga); *flags |= UC_VIM9; } diff --git a/src/version.c b/src/version.c index 4ebfc1522d..628ebadacc 100644 --- a/src/version.c +++ b/src/version.c @@ -734,6 +734,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 309, /**/ 308, /**/