File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed
Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -710,7 +710,14 @@ channel_open(
710710 channel_free (channel );
711711 return NULL ;
712712 }
713- memcpy ((char * )& server .sin_addr , host -> h_addr , host -> h_length );
713+ {
714+ char * p ;
715+
716+ /* When using host->h_addr directly ubsan warns for it to not be
717+ * aligned. First copy the pointer to aviod that. */
718+ memcpy (& p , & host -> h_addr , sizeof (p ));
719+ memcpy ((char * )& server .sin_addr , p , host -> h_length );
720+ }
714721
715722 /* On Mac and Solaris a zero timeout almost never works. At least wait
716723 * one millisecond. Let's do it for all systems, because we don't know why
Original file line number Diff line number Diff line change @@ -764,6 +764,8 @@ static char *(features[]) =
764764
765765static int included_patches [] =
766766{ /* Add new patch number below this line */
767+ /**/
768+ 183 ,
767769/**/
768770 182 ,
769771/**/
You can’t perform that action at this time.
0 commit comments