• R/O
  • SSH

vim: 提交

Mirror of the Vim source from https://github.com/vim/vim


Commit MetaInfo

修訂4cce4a5d3fd31108589cb329e8dd3e722cc959e0 (tree)
時間2020-11-21 22:00:03
作者Bram Moolenaar <Bram@vim....>
CommiterBram Moolenaar

Log Message

patch 8.2.2026: Coverity warns for possibly using not NUL terminated string

Commit: https://github.com/vim/vim/commit/e79cdb69a4905ccf766494265d4c6f8701d10c39
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Nov 21 13:51:16 2020 +0100

patch 8.2.2026: Coverity warns for possibly using not NUL terminated string
Problem: Coverity warns for possibly using not NUL terminated string.
Solution: Put a NUL in b0_hname just in case.

Change Summary

差異

diff -r e7c125224b1a -r 4cce4a5d3fd3 src/memline.c
--- a/src/memline.c Sat Nov 21 13:30:04 2020 +0100
+++ b/src/memline.c Sat Nov 21 14:00:03 2020 +0100
@@ -2252,6 +2252,7 @@
22522252
22532253 mch_get_host_name(hostname, B0_HNAME_SIZE);
22542254 hostname[B0_HNAME_SIZE - 1] = NUL;
2255+ b0.b0_hname[B0_HNAME_SIZE - 1] = NUL; // in case of corruption
22552256 if (STRICMP(b0.b0_hname, hostname) != 0)
22562257 ret = FALSE;
22572258 }
diff -r e7c125224b1a -r 4cce4a5d3fd3 src/version.c
--- a/src/version.c Sat Nov 21 13:30:04 2020 +0100
+++ b/src/version.c Sat Nov 21 14:00:03 2020 +0100
@@ -751,6 +751,8 @@
751751 static int included_patches[] =
752752 { /* Add new patch number below this line */
753753 /**/
754+ 2026,
755+/**/
754756 2025,
755757 /**/
756758 2024,
Show on old repository browser