]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Fix an incorrect usage of sizeof()
authorRussell Bryant <russell@russellbryant.com>
Wed, 29 Oct 2008 05:23:51 +0000 (05:23 +0000)
committerRussell Bryant <russell@russellbryant.com>
Wed, 29 Oct 2008 05:23:51 +0000 (05:23 +0000)
(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

channels/chan_sip.c

index 0e744d4164229179a167e3f26897272388738092..979b5de50344838105b7f5a9177e4939ff86a5d2 100644 (file)
@@ -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));
                                        }