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 -- [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/202005102120.04ALKYeu023900%40masaka.moolenaar.net.

Raspunde prin e-mail lui