[Asterisk-code-review] chan unistim: Fix memcpy in get to address (asterisk[certified/11.6])
George Joseph
asteriskteam at digium.com
Wed Jul 20 14:46:27 CDT 2016
George Joseph has uploaded a new change for review.
https://gerrit.asterisk.org/3261
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
(cherry picked from commit de169f14e6885934a0ebcdf7564eeb1e6fe99a21)
---
M channels/chan_unistim.c
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/61/3261/1
diff --git a/channels/chan_unistim.c b/channels/chan_unistim.c
index cb786eb..125d5aa 100644
--- a/channels/chan_unistim.c
+++ b/channels/chan_unistim.c
@@ -985,7 +985,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/3261
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id4927ff256c0e470bdf7bcfc025146a2f656e708
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: certified/11.6
Gerrit-Owner: George Joseph <gjoseph at digium.com>
More information about the asterisk-code-review
mailing list