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

2 views
Skip to first unread message

Christian Brabandt

unread,
Jun 22, 2025, 2:00:13 PM6/22/25
to vim...@googlegroups.com
patch 9.1.1474: missing out-of-memory check in mark.c

Commit: https://github.com/vim/vim/commit/46b02602d6a8b1c62e34cdc05d744812479f4ce3
Author: John Marriott <basi...@internode.on.net>
Date: Sun Jun 22 19:44:27 2025 +0200

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 <basi...@internode.on.net>
Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/src/mark.c b/src/mark.c
index 9bab352a8..778110f91 100644
--- a/src/mark.c
+++ b/src/mark.c
@@ -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))
diff --git a/src/version.c b/src/version.c
index bafcef18b..8f9033bf7 100644
--- a/src/version.c
+++ b/src/version.c
@@ -709,6 +709,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 1474,
/**/
1473,
/**/
Reply all
Reply to author
Forward
0 new messages