To: vim_dev@googlegroups.com Subject: Patch 8.0.1825 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.0.1825 Problem: Might use NULL pointer when out of memory. (Coverity) Solution: Handle NULL pointer better. Files: src/getchar.c *** ../vim-8.0.1824/src/getchar.c 2018-05-01 18:47:52.992188456 +0200 --- src/getchar.c 2018-05-12 21:21:40.459595008 +0200 *************** *** 4523,4532 **** if (vim_strbyte(mp->m_keys, K_SPECIAL) != NULL) { /* might have CSI escaped mp->m_keys */ ! q = vim_strsave(mp->m_keys); ! if (q != NULL) { vim_unescape_csi(q); qlen = (int)STRLEN(q); } --- 4523,4534 ---- if (vim_strbyte(mp->m_keys, K_SPECIAL) != NULL) { + char_u *qe = vim_strsave(mp->m_keys); + /* might have CSI escaped mp->m_keys */ ! if (qe != NULL) { + q = qe; vim_unescape_csi(q); qlen = (int)STRLEN(q); } *** ../vim-8.0.1824/src/version.c 2018-05-12 21:16:15.361769892 +0200 --- src/version.c 2018-05-12 21:22:25.895291085 +0200 *************** *** 763,764 **** --- 763,766 ---- { /* Add new patch number below this line */ + /**/ + 1825, /**/ -- ARTHUR: What does it say? BROTHER MAYNARD: It reads ... "Here may be found the last words of Joseph of Aramathea." "He who is valorous and pure of heart may find the Holy Grail in the aaaaarrrrrrggghhh..." ARTHUR: What? BROTHER MAYNARD: "The Aaaaarrrrrrggghhh..." "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD /// 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 ///