From: Russell Bryant Date: Wed, 29 Oct 2008 05:23:51 +0000 (+0000) Subject: Fix an incorrect usage of sizeof() X-Git-Tag: 1.4.23-rc1~10 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c1cdf01a0e155258e2675b6290c0fab97fd304dd;p=thirdparty%2Fasterisk.git Fix an incorrect usage of sizeof() (closes issue #13795) Reported by: andrew53 Patches: chan_sip_sizeof.patch uploaded by andrew53 (license 519) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@152539 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 0e744d4164..979b5de503 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -5279,7 +5279,7 @@ static int process_sdp(struct sip_pvt *p, struct sip_request *req) struct sockaddr_in peer; ast_rtp_get_peer(p->rtp, &peer); if (peer.sin_addr.s_addr) { - memcpy(&sin.sin_addr, &peer.sin_addr, sizeof(&sin.sin_addr)); + memcpy(&sin.sin_addr, &peer.sin_addr, sizeof(sin.sin_addr)); if (debug) { ast_log(LOG_DEBUG, "Peer T.38 UDPTL is set behind NAT and with destination, destination address now %s\n", ast_inet_ntoa(sin.sin_addr)); }