mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:8.1.2026: possibly using uninitialized memory #11013
Problem: Possibly using uninitialized memory.
Solution: Check if "dict" is NULL. (closes vim/vim#4925)
dbec74907e
This commit is contained in:
parent
5a3c86205f
commit
4cee0e0731
@ -5577,11 +5577,12 @@ void cursor_pos_info(dict_T *dict)
|
|||||||
}
|
}
|
||||||
|
|
||||||
bom_count = bomb_size();
|
bom_count = bomb_size();
|
||||||
if (bom_count > 0) {
|
if (dict == NULL && bom_count > 0) {
|
||||||
vim_snprintf((char *)IObuff + STRLEN(IObuff), IOSIZE - STRLEN(IObuff),
|
vim_snprintf((char *)IObuff + STRLEN(IObuff), IOSIZE - STRLEN(IObuff),
|
||||||
_("(+%" PRId64 " for BOM)"), (int64_t)bom_count);
|
_("(+%" PRId64 " for BOM)"), (int64_t)bom_count);
|
||||||
}
|
}
|
||||||
if (dict == NULL) {
|
if (dict == NULL) {
|
||||||
|
// Don't shorten this message, the user asked for it.
|
||||||
p = p_shm;
|
p = p_shm;
|
||||||
p_shm = (char_u *)"";
|
p_shm = (char_u *)"";
|
||||||
msg(IObuff);
|
msg(IObuff);
|
||||||
|
Loading…
Reference in New Issue
Block a user