Patch 8.2.3381
Problem: Crash when using NULL list with sign functions.
Solution: Handle a NULL list like an empty list. (issue #8260)
Files: src/globals.h, src/testdir/test_signs.vim
*** ../vim-8.2.3380/src/globals.h 2021-08-14 14:00:58.233863891 +0200
--- src/globals.h 2021-08-28 14:28:53.993771257 +0200
***************
*** 1902,1908 ****
#endif
#define FOR_ALL_LIST_ITEMS(l, li) \
! for ((li) = (l)->lv_first; (li) != NULL; (li) = (li)->li_next)
// While executing a regexp and set to OPTION_MAGIC_ON or OPTION_MAGIC_OFF
this
// overrules p_magic. Otherwise set to OPTION_MAGIC_NOT_SET.
--- 1902,1908 ----
#endif
#define FOR_ALL_LIST_ITEMS(l, li) \
! for ((li) = (l) == NULL ? NULL : (l)->lv_first; (li) != NULL; (li) =
(li)->li_next)
// While executing a regexp and set to OPTION_MAGIC_ON or OPTION_MAGIC_OFF
this
// overrules p_magic. Otherwise set to OPTION_MAGIC_NOT_SET.
*** ../vim-8.2.3380/src/testdir/test_signs.vim 2020-09-04 21:18:40.488161918
+0200
--- src/testdir/test_signs.vim 2021-08-28 14:41:27.329228325 +0200
***************
*** 2012,2015 ****
--- 2012,2022 ----
call delete("Xsign")
endfunc
+ func Test_sign_null_list()
+ eval test_null_list()->sign_define()
+ eval test_null_list()->sign_placelist()
+ eval test_null_list()->sign_undefine()
+ eval test_null_list()->sign_unplacelist()
+ endfunc
+
" vim: shiftwidth=2 sts=2 expandtab
*** ../vim-8.2.3380/src/version.c 2021-08-28 12:49:21.961091778 +0200
--- src/version.c 2021-08-28 14:26:30.078984774 +0200
***************
*** 757,758 ****
--- 757,760 ----
{ /* Add new patch number below this line */
+ /**/
+ 3381,
/**/
--
If all you have is a hammer, everything looks like a nail.
When your hammer is C++, everything begins to look like a thumb.
-- Steve Hoflich, comp.lang.c++
/// 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/202108281246.17SCkhsw3067877%40masaka.moolenaar.net.