comparison src/vim9compile.c @ 20359:fad124c0e349 v8.2.0735

patch 8.2.0735: Vim9: using unitialized memory Commit: https://github.com/vim/vim/commit/bc38f25c021dc4314c77d50a608329a328b0d988 Author: Bram Moolenaar <Bram@vim.org> Date: Sun May 10 23:20:06 2020 +0200 patch 8.2.0735: Vim9: using unitialized memory Problem: Vim9: using unitialized memory. Solution: Clear the arg_lvar field.
author Bram Moolenaar <Bram@vim.org>
date Sun, 10 May 2020 23:30:03 +0200
parents fc2d76e0994c
children c225be44692a
comparison
equal deleted inserted replaced
20358:a30777aed380 20359:fad124c0e349
4760 semsg(_("E1034: Cannot use reserved name %s"), name); 4760 semsg(_("E1034: Cannot use reserved name %s"), name);
4761 goto theend; 4761 goto theend;
4762 } 4762 }
4763 4763
4764 lvar = lookup_local(arg, varlen, cctx); 4764 lvar = lookup_local(arg, varlen, cctx);
4765 if (lvar == NULL 4765 if (lvar == NULL)
4766 && lookup_arg(arg, varlen, 4766 {
4767 CLEAR_FIELD(arg_lvar);
4768 if (lookup_arg(arg, varlen,
4767 &arg_lvar.lv_idx, &arg_lvar.lv_type, 4769 &arg_lvar.lv_idx, &arg_lvar.lv_type,
4768 &arg_lvar.lv_from_outer, cctx) == OK) 4770 &arg_lvar.lv_from_outer, cctx) == OK)
4769 {
4770 if (is_decl)
4771 { 4771 {
4772 semsg(_(e_used_as_arg), name); 4772 if (is_decl)
4773 goto theend; 4773 {
4774 semsg(_(e_used_as_arg), name);
4775 goto theend;
4776 }
4777 lvar = &arg_lvar;
4774 } 4778 }
4775 arg_lvar.lv_const = 0;
4776 lvar = &arg_lvar;
4777 } 4779 }
4778 if (lvar != NULL) 4780 if (lvar != NULL)
4779 { 4781 {
4780 if (is_decl) 4782 if (is_decl)
4781 { 4783 {