From bc69b033167c0fe6f2cfb71e39aaa2c73d60fa32 Mon Sep 17 00:00:00 2001 From: George Joseph Date: Wed, 22 Jun 2016 09:37:23 -0600 Subject: chan_unistim: Fix memcpy in get_to_address A code block only enabled when HAVE_PKTINFO is not defined (FreeBSD) was using a pointer to a pointer as the destination of a memcpy and a '&' instead of '*' in the sizeof. ASTERISK-26138 #close Change-Id: Id4927ff256c0e470bdf7bcfc025146a2f656e708 --- channels/chan_unistim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'channels/chan_unistim.c') diff --git a/channels/chan_unistim.c b/channels/chan_unistim.c index db4720d1a..c48f0f55d 100644 --- a/channels/chan_unistim.c +++ b/channels/chan_unistim.c @@ -1021,7 +1021,7 @@ static int get_to_address(int fd, struct sockaddr_in *toAddr) memcpy(&toAddr->sin_addr, &ip_msg.address, sizeof(struct in_addr)); return err; #else - memcpy(&toAddr, &public_ip, sizeof(&toAddr)); + memcpy(toAddr, &public_ip, sizeof(*toAddr)); return 0; #endif } -- cgit v1.2.3