Patch 8.1.1653
Problem: Ubsan warns for possibly passing NULL pointer.
Solution: Skip code when length is zero. (Dominique Pelle, closes #4631)
Files: src/channel.c
*** ../vim-8.1.1652/src/channel.c 2019-06-28 22:06:41.110072146 +0200
--- src/channel.c 2019-07-08 22:01:10.759502396 +0200
***************
*** 3990,3996 ****
writeq_T *last = wq->wq_prev;
/* append to the last entry */
! if (ga_grow(&last->wq_ga, len) == OK)
{
mch_memmove((char *)last->wq_ga.ga_data
+ last->wq_ga.ga_len,
--- 3990,3996 ----
writeq_T *last = wq->wq_prev;
/* append to the last entry */
! if (len > 0 && ga_grow(&last->wq_ga, len) == OK)
{
mch_memmove((char *)last->wq_ga.ga_data
+ last->wq_ga.ga_len,
***************
*** 4012,4018 ****
wq->wq_prev->wq_next = last;
wq->wq_prev = last;
ga_init2(&last->wq_ga, 1, 1000);
! if (ga_grow(&last->wq_ga, len) == OK)
{
mch_memmove(last->wq_ga.ga_data, buf, len);
last->wq_ga.ga_len = len;
--- 4012,4018 ----
wq->wq_prev->wq_next = last;
wq->wq_prev = last;
ga_init2(&last->wq_ga, 1, 1000);
! if (len > 0 && ga_grow(&last->wq_ga, len) == OK)
{
mch_memmove(last->wq_ga.ga_data, buf, len);
last->wq_ga.ga_len = len;
*** ../vim-8.1.1652/src/version.c 2019-07-08 21:57:26.291708275 +0200
--- src/version.c 2019-07-08 22:03:52.403195879 +0200
***************
*** 779,780 ****
--- 779,782 ----
{ /* Add new patch number below this line */
+ /**/
+ 1653,
/**/
--
DENNIS: Listen -- strange women lying in ponds distributing swords is no
basis for a system of government. Supreme executive power derives
from a mandate from the masses, not from some farcical aquatic
ceremony.
The Quest for the Holy Grail (Monty Python)
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ 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/201907082004.x68K4Jos020408%40masaka.moolenaar.net.
For more options, visit https://groups.google.com/d/optout.