Patch 8.0.0183
Summary: ubsan warns for unaligned address
Problem: Ubsan warns for using a pointer that is not aligned.
Solution: First copy the address. (Yegappan Lakshmanan)
Files: src/channel.c
*** ../vim-8.0.0182/src/channel.c 2017-01-10 15:15:32.882134134 +0100
--- src/channel.c 2017-01-14 17:01:34.220082253 +0100
***************
*** 710,716 ****
channel_free(channel);
return NULL;
}
! memcpy((char *)&server.sin_addr, host->h_addr, host->h_length);
/* On Mac and Solaris a zero timeout almost never works. At least wait
* one millisecond. Let's do it for all systems, because we don't know why
--- 710,723 ----
channel_free(channel);
return NULL;
}
! {
! char *p;
!
! /* When using host->h_addr directly ubsan warns for it to not be
! * aligned. First copy the pointer to aviod that. */
! memcpy(&p, &host->h_addr, sizeof(p));
! memcpy((char *)&server.sin_addr, p, host->h_length);
! }
/* On Mac and Solaris a zero timeout almost never works. At least wait
* one millisecond. Let's do it for all systems, because we don't know why
*** ../vim-8.0.0182/src/version.c 2017-01-14 15:52:42.889489220 +0100
--- src/version.c 2017-01-14 16:58:58.469042689 +0100
***************
*** 766,767 ****
--- 766,769 ----
{ /* Add new patch number below this line */
+ /**/
+ 183,
/**/
--
We're knights of the round table
We dance whene'er we're able
We do routines and chorus scenes
With footwork impeccable.
We dine well here in Camelot
We eat ham and jam and spam a lot.
"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/ \\\
\\\ 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].
For more options, visit https://groups.google.com/d/optout.