0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.0.1825: might use NULL pointer when out of memory

Problem:    Might use NULL pointer when out of memory. (Coverity)
Solution:   Handle NULL pointer better.
This commit is contained in:
Bram Moolenaar
2018-05-12 21:34:58 +02:00
parent 73dd1bd54e
commit dd1d7be4e6
2 changed files with 6 additions and 2 deletions

View File

@@ -4523,10 +4523,12 @@ check_abbr(
if (vim_strbyte(mp->m_keys, K_SPECIAL) != NULL)
{
char_u *qe = vim_strsave(mp->m_keys);
/* might have CSI escaped mp->m_keys */
q = vim_strsave(mp->m_keys);
if (q != NULL)
if (qe != NULL)
{
q = qe;
vim_unescape_csi(q);
qlen = (int)STRLEN(q);
}

View File

@@ -761,6 +761,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1825,
/**/
1824,
/**/