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>
diff --git a/src/mark.c b/src/mark.c
index 9bab352..778110f 100644
--- a/src/mark.c
+++ b/src/mark.c
@@ -783,6 +783,11 @@
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 bafcef1..8f9033b 100644
--- a/src/version.c
+++ b/src/version.c
@@ -710,6 +710,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1474,
+/**/
1473,
/**/
1472,