forked from aniani/vim
patch 8.2.0063: wrong size argument to vim_snprintf()
Problem: Wrong size argument to vim_snprintf(). (Dominique Pelle) Solution: Reduce the size by the length. (related to #5410)
This commit is contained in:
@@ -3813,8 +3813,12 @@ cursor_pos_info(dict_T *dict)
|
|||||||
|
|
||||||
bom_count = bomb_size();
|
bom_count = bomb_size();
|
||||||
if (dict == NULL && bom_count > 0)
|
if (dict == NULL && bom_count > 0)
|
||||||
vim_snprintf((char *)IObuff + STRLEN(IObuff), IOSIZE,
|
{
|
||||||
|
size_t len = STRLEN(IObuff);
|
||||||
|
|
||||||
|
vim_snprintf((char *)IObuff + len, IOSIZE - len,
|
||||||
_("(+%lld for BOM)"), (long_long_T)bom_count);
|
_("(+%lld for BOM)"), (long_long_T)bom_count);
|
||||||
|
}
|
||||||
if (dict == NULL)
|
if (dict == NULL)
|
||||||
{
|
{
|
||||||
// Don't shorten this message, the user asked for it.
|
// Don't shorten this message, the user asked for it.
|
||||||
|
@@ -742,6 +742,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 */
|
||||||
|
/**/
|
||||||
|
63,
|
||||||
/**/
|
/**/
|
||||||
62,
|
62,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user