Patch 8.2.2779
Problem: Memory access error in remove() for blob.
Solution: Adjust length for memmove().
Files: src/blob.c
*** ../vim-8.2.2778/src/blob.c 2021-04-17 20:44:52.442520718 +0200
--- src/blob.c 2021-04-17 21:19:48.147769871 +0200
***************
*** 444,450 ****
{
blob_T *blob;
! // Remove range of items, return list with values.
end = (long)tv_get_number_chk(&argvars[2], &error);
if (error)
return;
--- 444,450 ----
{
blob_T *blob;
! // Remove range of items, return blob with values.
end = (long)tv_get_number_chk(&argvars[2], &error);
if (error)
return;
***************
*** 472,478 ****
rettv->v_type = VAR_BLOB;
rettv->vval.v_blob = blob;
! mch_memmove(p + idx, p + end + 1, (size_t)(len - end));
b->bv_ga.ga_len -= end - idx + 1;
}
}
--- 472,479 ----
rettv->v_type = VAR_BLOB;
rettv->vval.v_blob = blob;
! if (len - end - 1 > 0)
! mch_memmove(p + idx, p + end + 1, (size_t)(len - end - 1));
b->bv_ga.ga_len -= end - idx + 1;
}
}
*** ../vim-8.2.2778/src/version.c 2021-04-17 21:04:22.054657370 +0200
--- src/version.c 2021-04-17 21:21:13.735511442 +0200
***************
*** 752,753 ****
--- 752,755 ----
{ /* Add new patch number below this line */
+ /**/
+ 2779,
/**/
--
Amnesia is one of my favorite words, but I forgot what it means.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/202104171923.13HJNFWw129084%40masaka.moolenaar.net.