Patch 8.2.2026

4 views
Skip to first unread message

Bram Moolenaar

unread,
Nov 21, 2020, 7:51:53 AM11/21/20
to vim...@googlegroups.com

Patch 8.2.2026
Problem: Coverity warns for possibly using not NUL terminated string.
Solution: Put a NUL in b0_hname just in case.
Files: src/memline.c


*** ../vim-8.2.2025/src/memline.c 2020-11-09 21:04:12.203986366 +0100
--- src/memline.c 2020-11-21 13:50:46.929955692 +0100
***************
*** 2252,2257 ****
--- 2252,2258 ----

mch_get_host_name(hostname, B0_HNAME_SIZE);
hostname[B0_HNAME_SIZE - 1] = NUL;
+ b0.b0_hname[B0_HNAME_SIZE - 1] = NUL; // in case of corruption
if (STRICMP(b0.b0_hname, hostname) != 0)
ret = FALSE;
}
*** ../vim-8.2.2025/src/version.c 2020-11-21 12:44:48.507365103 +0100
--- src/version.c 2020-11-21 13:50:37.701990296 +0100
***************
*** 752,753 ****
--- 752,755 ----
{ /* Add new patch number below this line */
+ /**/
+ 2026,
/**/

--
Facepalm statement #8: "Drive faster, the petrol is running out"

/// Bram Moolenaar -- Br...@Moolenaar.net -- 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 ///
Reply all
Reply to author
Forward
0 new messages