To: vim_dev@googlegroups.com Subject: Patch 8.2.1289 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.1289 Problem: Crash when using a custom completion function. Solution: Initialize all of the expand_T. (closes #6532) Files: src/cmdexpand.c *** ../vim-8.2.1288/src/cmdexpand.c 2020-07-21 21:07:00.716496755 +0200 --- src/cmdexpand.c 2020-07-25 14:09:13.409696136 +0200 *************** *** 494,511 **** void ExpandInit(expand_T *xp) { ! xp->xp_pattern = NULL; ! xp->xp_pattern_len = 0; xp->xp_backslash = XP_BS_NONE; - #ifndef BACKSLASH_IN_FILENAME - xp->xp_shell = FALSE; - #endif xp->xp_numfiles = -1; - xp->xp_files = NULL; - #if defined(FEAT_EVAL) - xp->xp_arg = NULL; - #endif - xp->xp_line = NULL; } /* --- 494,502 ---- void ExpandInit(expand_T *xp) { ! CLEAR_POINTER(xp); xp->xp_backslash = XP_BS_NONE; xp->xp_numfiles = -1; } /* *************** *** 2425,2431 **** # if defined(FEAT_EVAL) /* * Call "user_expand_func()" to invoke a user defined Vim script function and ! * return the result (either a string or a List). */ static void * call_user_expand_func( --- 2416,2422 ---- # if defined(FEAT_EVAL) /* * Call "user_expand_func()" to invoke a user defined Vim script function and ! * return the result (either a string, a List or NULL). */ static void * call_user_expand_func( *** ../vim-8.2.1288/src/version.c 2020-07-24 18:47:18.607480118 +0200 --- src/version.c 2020-07-25 14:10:24.589435921 +0200 *************** *** 756,757 **** --- 756,759 ---- { /* Add new patch number below this line */ + /**/ + 1289, /**/ -- ASCII stupid question, get a stupid ANSI. /// 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 ///