Patch 8.2.1896
Problem: Valgrind warns for using uninitialized memory.
Solution: NUL terminate the SmcOpenConnection() error message. (Dominique
Pellé, closes #7194)
Files: src/os_unix.c
*** ../vim-8.2.1895/src/os_unix.c 2020-10-09 23:04:43.676144228 +0200
--- src/os_unix.c 2020-10-24 13:29:02.516565586 +0200
***************
*** 8068,8077 ****
errorstring);
if (xsmp.smcconn == NULL)
{
- char errorreport[132];
-
if (p_verbose > 0)
{
vim_snprintf(errorreport, sizeof(errorreport),
_("XSMP SmcOpenConnection failed: %s"), errorstring);
verb_msg(errorreport);
--- 8068,8080 ----
errorstring);
if (xsmp.smcconn == NULL)
{
if (p_verbose > 0)
{
+ char errorreport[132];
+
+ // If the message is too long it might not be NUL terminated. Add
+ // a NUL at the end to make sure we don't go over the end.
+ errorstring[sizeof(errorstring) - 1] = NUL;
vim_snprintf(errorreport, sizeof(errorreport),
_("XSMP SmcOpenConnection failed: %s"), errorstring);
verb_msg(errorreport);
*** ../vim-8.2.1895/src/version.c 2020-10-23 18:51:03.531271374 +0200
--- src/version.c 2020-10-24 13:30:31.956285408 +0200
***************
*** 752,753 ****
--- 752,755 ----
{ /* Add new patch number below this line */
+ /**/
+ 1896,
/**/
--
"Computers in the future may weigh no more than 1.5 tons."
Popular Mechanics, 1949
/// 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/202010241132.09OBWjvG977572%40masaka.moolenaar.net.