To: vim_dev@googlegroups.com Subject: Patch 8.2.0735 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.0735 Problem: Vim9: using unitialized memory. Solution: Clear the arg_lvar field. Files: src/vim9compile.c *** ../vim-8.2.0734/src/vim9compile.c 2020-05-10 22:53:51.282678776 +0200 --- src/vim9compile.c 2020-05-10 23:18:21.225450715 +0200 *************** *** 4762,4779 **** } lvar = lookup_local(arg, varlen, cctx); ! if (lvar == NULL ! && lookup_arg(arg, varlen, &arg_lvar.lv_idx, &arg_lvar.lv_type, &arg_lvar.lv_from_outer, cctx) == OK) - { - if (is_decl) { ! semsg(_(e_used_as_arg), name); ! goto theend; } - arg_lvar.lv_const = 0; - lvar = &arg_lvar; } if (lvar != NULL) { --- 4762,4781 ---- } lvar = lookup_local(arg, varlen, cctx); ! if (lvar == NULL) ! { ! CLEAR_FIELD(arg_lvar); ! if (lookup_arg(arg, varlen, &arg_lvar.lv_idx, &arg_lvar.lv_type, &arg_lvar.lv_from_outer, cctx) == OK) { ! if (is_decl) ! { ! semsg(_(e_used_as_arg), name); ! goto theend; ! } ! lvar = &arg_lvar; } } if (lvar != NULL) { *** ../vim-8.2.0734/src/version.c 2020-05-10 23:11:49.606819444 +0200 --- src/version.c 2020-05-10 23:19:45.161317125 +0200 *************** *** 748,749 **** --- 748,751 ---- { /* Add new patch number below this line */ + /**/ + 735, /**/ -- From "know your smileys": !-| I-am-a-Cylon-Centurian-with-one-red-eye-bouncing-back-and-forth /// 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 ///