To: vim_dev@googlegroups.com Subject: Patch 8.0.0852 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.0.0852 (after 8.0.0850) Problem: MS-Windows: possible crash when giving a message on startup. Solution: Initialize length. (Yasuhiro Matsumoto, closes #1931) Files: src/message.c *** ../vim-8.0.0851/src/message.c 2017-08-03 17:37:44.547737719 +0200 --- src/message.c 2017-08-03 18:48:20.756745850 +0200 *************** *** 2639,2651 **** # if defined(FEAT_MBYTE) && !defined(FEAT_GUI_MSWIN) if (enc_codepage >= 0 && (int)GetConsoleCP() != enc_codepage) { ! int len; ! WCHAR *widestr = (WCHAR *)enc_to_utf16(str, &len); if (widestr != NULL) { ! WideCharToMultiByte_alloc(GetConsoleCP(), 0, widestr, len, ! (LPSTR *)&ccp, &len, 0, 0); vim_free(widestr); s = str = ccp; } --- 2639,2652 ---- # if defined(FEAT_MBYTE) && !defined(FEAT_GUI_MSWIN) if (enc_codepage >= 0 && (int)GetConsoleCP() != enc_codepage) { ! int inlen = STRLEN(str); ! int outlen; ! WCHAR *widestr = (WCHAR *)enc_to_utf16(str, &inlen); if (widestr != NULL) { ! WideCharToMultiByte_alloc(GetConsoleCP(), 0, widestr, inlen, ! (LPSTR *)&ccp, &outlen, 0, 0); vim_free(widestr); s = str = ccp; } *** ../vim-8.0.0851/src/version.c 2017-08-03 17:53:59.296577109 +0200 --- src/version.c 2017-08-03 18:53:38.634428790 +0200 *************** *** 771,772 **** --- 771,774 ---- { /* Add new patch number below this line */ + /**/ + 852, /**/ -- Seen on the back of a biker's vest: If you can read this, my wife fell off. /// Bram Moolenaar -- Bram@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 ///