Patch 9.0.1042
Problem:    ASAN gives false alarm about array access.
Solution:   Use an intermediate pointer.
Files:      src/vim9class.c


*** ../vim-9.0.1041/src/vim9class.c     2022-12-09 21:41:43.908327271 +0000
--- src/vim9class.c     2022-12-09 22:39:30.166805632 +0000
***************
*** 441,447 ****
        for (int i = 0; i < cl->class_obj_method_count; ++i)
        {
            ufunc_T *fp = cl->class_obj_methods[i];
!           if (STRNCMP(name, fp->uf_name, len) == 0 && fp->uf_name[len] == NUL)
            {
                typval_T    argvars[MAX_FUNC_ARGS + 1];
                int         argcount = 0;
--- 441,450 ----
        for (int i = 0; i < cl->class_obj_method_count; ++i)
        {
            ufunc_T *fp = cl->class_obj_methods[i];
!           // Use a separate pointer to avoid that ASAN complains about
!           // uf_name[] only being 4 characters.
!           char_u *ufname = (char_u *)fp->uf_name;
!           if (STRNCMP(name, ufname, len) == 0 && ufname[len] == NUL)
            {
                typval_T    argvars[MAX_FUNC_ARGS + 1];
                int         argcount = 0;
*** ../vim-9.0.1041/src/version.c       2022-12-09 21:41:43.908327271 +0000
--- src/version.c       2022-12-09 22:48:59.207494656 +0000
***************
*** 697,698 ****
--- 697,700 ----
  {   /* Add new patch number below this line */
+ /**/
+     1042,
  /**/

-- 
A cow comes flying over the battlements,  lowing aggressively.  The cow
lands on GALAHAD'S PAGE, squashing him completely.
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            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/20221209225000.795AE1C1742%40moolenaar.net.

Raspunde prin e-mail lui