To: vim_dev@googlegroups.com Subject: Patch 8.2.3998 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.3998 Problem: Asan error for adding zero to NULL. Solution: Do not compute pointer if there are no entries. Files: src/vim9type.c *** ../vim-8.2.3997/src/vim9type.c 2022-01-04 15:16:57.879864882 +0000 --- src/vim9type.c 2022-01-04 16:04:24.467573961 +0000 *************** *** 1267,1273 **** cctx_T *cctx) { garray_T *stack = &cctx->ctx_type_stack; ! type2_T *typep = ((type2_T *)stack->ga_data) + stack->ga_len; garray_T *type_gap = cctx->ctx_type_list; int i; type_T *result; --- 1267,1273 ---- cctx_T *cctx) { garray_T *stack = &cctx->ctx_type_stack; ! type2_T *typep; garray_T *type_gap = cctx->ctx_type_list; int i; type_T *result; *************** *** 1283,1288 **** --- 1283,1289 ---- // Use the first value type for the list member type, then find the common // type from following items. + typep = ((type2_T *)stack->ga_data) + stack->ga_len; result = (typep -(count * skip) + skip - 1)->type_curr; decl_result = (typep -(count * skip) + skip - 1)->type_decl; for (i = 1; i < count; ++i) *** ../vim-8.2.3997/src/version.c 2022-01-04 15:54:34.596486122 +0000 --- src/version.c 2022-01-04 16:05:24.571482958 +0000 *************** *** 752,753 **** --- 752,755 ---- { /* Add new patch number below this line */ + /**/ + 3998, /**/ -- hundred-and-one symptoms of being an internet addict: 215. Your mouse-clicking forearm rivals Popeye's. /// 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 ///