Skip to content

Commit 08b28b7

Browse files
committed
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)
1 parent e7538ae commit 08b28b7

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

src/ops.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3813,8 +3813,12 @@ cursor_pos_info(dict_T *dict)
38133813

38143814
bom_count = bomb_size();
38153815
if (dict == NULL && bom_count > 0)
3816-
vim_snprintf((char *)IObuff + STRLEN(IObuff), IOSIZE,
3816+
{
3817+
size_t len = STRLEN(IObuff);
3818+
3819+
vim_snprintf((char *)IObuff + len, IOSIZE - len,
38173820
_("(+%lld for BOM)"), (long_long_T)bom_count);
3821+
}
38183822
if (dict == NULL)
38193823
{
38203824
// Don't shorten this message, the user asked for it.

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -742,6 +742,8 @@ static char *(features[]) =
742742

743743
static int included_patches[] =
744744
{ /* Add new patch number below this line */
745+
/**/
746+
63,
745747
/**/
746748
62,
747749
/**/

0 commit comments

Comments
 (0)