Merged revisions 152539 via svnmerge from
authorRussell Bryant <russell@russellbryant.com>
Wed, 29 Oct 2008 05:34:26 +0000 (05:34 +0000)
committerRussell Bryant <russell@russellbryant.com>
Wed, 29 Oct 2008 05:34:26 +0000 (05:34 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r152539 | russell | 2008-10-29 00:23:51 -0500 (Wed, 29 Oct 2008) | 7 lines

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/trunk@152569 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index 9739ab3..060b9d9 100644 (file)
@@ -7264,7 +7264,7 @@ static int process_sdp(struct sip_pvt *p, struct sip_request *req, int t38action
                                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));
                                        }