Skip to content

Commit bf73b91

Browse files
committed
patch 7.4.1471
Problem: Missing out-of-memory check. And Coverity warning. Solution: Bail out when msg is NULL.
1 parent 289a905 commit bf73b91

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

src/channel.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1516,6 +1516,9 @@ may_invoke_callback(channel_T *channel, int part)
15161516
* get everything we have. */
15171517
msg = channel_get_all(channel, part);
15181518

1519+
if (msg == NULL)
1520+
return FALSE; /* out of memory (and avoids Coverity warning) */
1521+
15191522
argv[1].v_type = VAR_STRING;
15201523
argv[1].vval.v_string = msg;
15211524
}

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -743,6 +743,8 @@ static char *(features[]) =
743743

744744
static int included_patches[] =
745745
{ /* Add new patch number below this line */
746+
/**/
747+
1471,
746748
/**/
747749
1470,
748750
/**/

0 commit comments

Comments
 (0)