To: vim_dev@googlegroups.com Subject: Patch 9.0.1042 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ 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 -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///