]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 7.4.1471 v7.4.1471
authorBram Moolenaar <Bram@vim.org>
Wed, 2 Mar 2016 20:16:59 +0000 (21:16 +0100)
committerBram Moolenaar <Bram@vim.org>
Wed, 2 Mar 2016 20:16:59 +0000 (21:16 +0100)
Problem:    Missing out-of-memory check.  And Coverity warning.
Solution:   Bail out when msg is NULL.

src/channel.c
src/version.c

index 824da8a7d192ac5ec9376aece2e2a407d0414042..f9cfa853feb479d56341153d9ec86e1dfee38b8a 100644 (file)
@@ -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;
     }
index 66a86fb630c9eb1bc496c101663714a721feb540..234ff56b5878d0cf9b91c2367cbafd9f1a9c3f2b 100644 (file)
@@ -743,6 +743,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1471,
 /**/
     1470,
 /**/