]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.1474: missing out-of-memory check in mark.c v9.1.1474
authorJohn Marriott <basilisk@internode.on.net>
Sun, 22 Jun 2025 17:44:27 +0000 (19:44 +0200)
committerChristian Brabandt <cb@256bit.org>
Sun, 22 Jun 2025 17:44:27 +0000 (19:44 +0200)
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>
src/mark.c
src/version.c

index 9bab352a8f964489325a1ff72532beb795e88f15..778110f9192cc387247c176e2c7bc9ea5fa0557e 100644 (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))
index bafcef18b06f8eadf44507706e766f75352457f4..8f9033bf72f8098e300598f53cbab2264d8679e5 100644 (file)
@@ -709,6 +709,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1474,
 /**/
     1473,
 /**/