mirror of
https://github.com/vim/vim.git
synced 2025-09-28 04:24:06 -04:00
patch 7.4.1471
Problem: Missing out-of-memory check. And Coverity warning. Solution: Bail out when msg is NULL.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user