Patch 8.2.1785
Problem: Compiler warning for strcp() out of bounds. (Christian Brabandt)
Solution: use memmove() instead.
Files: src/dict.c
*** ../vim-8.2.1784/src/dict.c 2020-09-16 21:08:23.642361197 +0200
--- src/dict.c 2020-10-02 18:06:48.266996421 +0200
***************
*** 236,246 ****
dictitem_copy(dictitem_T *org)
{
dictitem_T *di;
! di = alloc(offsetof(dictitem_T, di_key) + STRLEN(org->di_key) + 1);
if (di != NULL)
{
! STRCPY(di->di_key, org->di_key);
di->di_flags = DI_FLAGS_ALLOC;
copy_tv(&org->di_tv, &di->di_tv);
}
--- 236,247 ----
dictitem_copy(dictitem_T *org)
{
dictitem_T *di;
+ size_t len = STRLEN(org->di_key);
! di = alloc(offsetof(dictitem_T, di_key) + len + 1);
if (di != NULL)
{
! mch_memmove(di->di_key, org->di_key, len + 1);
di->di_flags = DI_FLAGS_ALLOC;
copy_tv(&org->di_tv, &di->di_tv);
}
*** ../vim-8.2.1784/src/version.c 2020-10-02 10:29:28.520196600 +0200
--- src/version.c 2020-10-02 18:06:45.883004433 +0200
***************
*** 752,753 ****
--- 752,755 ----
{ /* Add new patch number below this line */
+ /**/
+ 1785,
/**/
--
How To Keep A Healthy Level Of Insanity:
9. As often as possible, skip rather than walk.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ 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/202010021612.092GCq6C1582716%40masaka.moolenaar.net.