0
0
mirror of https://github.com/vim/vim.git synced 2025-09-20 03:14:01 -04:00

patch 8.1.2026: possibly using uninitialized memory

Problem:    Possibly using uninitialized memory.
Solution:   Check if "dict" is NULL. (closes #4925)
This commit is contained in:
Bram Moolenaar 2019-09-13 22:16:21 +02:00
parent 1946de140a
commit dbec74907e
2 changed files with 4 additions and 2 deletions

View File

@ -7074,12 +7074,12 @@ cursor_pos_info(dict_T *dict)
}
bom_count = bomb_size();
if (bom_count > 0)
if (dict == NULL && bom_count > 0)
vim_snprintf((char *)IObuff + STRLEN(IObuff), IOSIZE,
_("(+%lld for BOM)"), (long_long_T)bom_count);
if (dict == NULL)
{
/* Don't shorten this message, the user asked for it. */
// Don't shorten this message, the user asked for it.
p = p_shm;
p_shm = (char_u *)"";
msg((char *)IObuff);

View File

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