[Asterisk-code-review] chan unistim: Fix memcpy with sizeof(&toAddr) (asterisk[11])

George Joseph asteriskteam at digium.com
Wed Jun 22 10:43:11 CDT 2016


George Joseph has uploaded a new change for review.

  https://gerrit.asterisk.org/3073

Change subject: chan_unistim:  Fix memcpy with sizeof(&toAddr)
......................................................................

chan_unistim:  Fix memcpy with sizeof(&toAddr)

A code block only enabled when HAVE_PKTINFO is not defined (FreeBSD)
was using a '&' instead of '*' in a memcpy pointer sizeof.

ASTERISK-26138 #close

Change-Id: Id4927ff256c0e470bdf7bcfc025146a2f656e708
---
M channels/chan_unistim.c
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/73/3073/1

diff --git a/channels/chan_unistim.c b/channels/chan_unistim.c
index a5cbdf2..386c6a8 100644
--- a/channels/chan_unistim.c
+++ b/channels/chan_unistim.c
@@ -984,7 +984,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/3073
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id4927ff256c0e470bdf7bcfc025146a2f656e708
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 11
Gerrit-Owner: George Joseph <gjoseph at digium.com>



More information about the asterisk-code-review mailing list