[asterisk-commits] chan unistim: Fix memcpy in get to address (asterisk[13])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Jun 22 18:50:53 CDT 2016


Anonymous Coward #1000019 has submitted this change and it was merged.

Change subject: chan_unistim:  Fix memcpy in get_to_address
......................................................................


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
---
M channels/chan_unistim.c
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Mark Michelson: Looks good to me, but someone else must approve
  Richard Mudgett: Looks good to me, but someone else must approve
  Anonymous Coward #1000019: Verified
  Joshua Colp: Looks good to me, approved



diff --git a/channels/chan_unistim.c b/channels/chan_unistim.c
index db4720d..c48f0f5 100644
--- a/channels/chan_unistim.c
+++ b/channels/chan_unistim.c
@@ -1021,7 +1021,7 @@
 	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
 }

-- 
To view, visit https://gerrit.asterisk.org/3071
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Id4927ff256c0e470bdf7bcfc025146a2f656e708
Gerrit-PatchSet: 2
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>



More information about the asterisk-commits mailing list