mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -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:
@@ -4523,10 +4523,12 @@ check_abbr(
|
|||||||
|
|
||||||
if (vim_strbyte(mp->m_keys, K_SPECIAL) != NULL)
|
if (vim_strbyte(mp->m_keys, K_SPECIAL) != NULL)
|
||||||
{
|
{
|
||||||
|
char_u *qe = vim_strsave(mp->m_keys);
|
||||||
|
|
||||||
/* might have CSI escaped mp->m_keys */
|
/* might have CSI escaped mp->m_keys */
|
||||||
q = vim_strsave(mp->m_keys);
|
if (qe != NULL)
|
||||||
if (q != NULL)
|
|
||||||
{
|
{
|
||||||
|
q = qe;
|
||||||
vim_unescape_csi(q);
|
vim_unescape_csi(q);
|
||||||
qlen = (int)STRLEN(q);
|
qlen = (int)STRLEN(q);
|
||||||
}
|
}
|
||||||
|
@@ -761,6 +761,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1825,
|
||||||
/**/
|
/**/
|
||||||
1824,
|
1824,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user