From bf73b91c664488ca57e2b4a8eb9b1f36f6625bc7 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 2 Mar 2016 21:16:59 +0100 Subject: [PATCH] patch 7.4.1471 Problem: Missing out-of-memory check. And Coverity warning. Solution: Bail out when msg is NULL. --- src/channel.c | 3 +++ src/version.c | 2 ++ 2 files changed, 5 insertions(+) diff --git a/src/channel.c b/src/channel.c index 824da8a7d..f9cfa853f 100644 --- a/src/channel.c +++ b/src/channel.c @@ -1516,6 +1516,9 @@ may_invoke_callback(channel_T *channel, int part) * get everything we have. */ msg = channel_get_all(channel, part); + if (msg == NULL) + return FALSE; /* out of memory (and avoids Coverity warning) */ + argv[1].v_type = VAR_STRING; argv[1].vval.v_string = msg; } diff --git a/src/version.c b/src/version.c index 66a86fb63..234ff56b5 100644 --- a/src/version.c +++ b/src/version.c @@ -743,6 +743,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1471, /**/ 1470, /**/