patch 9.1.1474: missing out-of-memory check in mark.c

Problem:  missing out-of-memory check in mark.c
Solution: bail out, if mark_line() returns NULL
          (John Marriott)

closes: #17578

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
John Marriott
2025-06-22 19:44:27 +02:00
committed by Christian Brabandt
parent 8d9d2b222d
commit 46b02602d6
2 changed files with 7 additions and 0 deletions

View File

@ -783,6 +783,11 @@ show_one_mark(
if (name == NULL && current)
{
name = mark_line(p, 15);
if (name == NULL)
{
emsg(_(e_out_of_memory));
return;
}
mustfree = TRUE;
}
if (!message_filtered(name))

View File

@ -709,6 +709,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1474,
/**/
1473,
/**/