[asterisk-commits] file: trunk r186563 - /trunk/main/rtp_engine.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Apr 6 08:23:17 CDT 2009
Author: file
Date: Mon Apr 6 08:23:12 2009
New Revision: 186563
URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=186563
Log:
Pass the correct value to sizeof when copying address information.
(issue #14827)
Reported by: pj
Patches:
14827.diff uploaded by file (license 11)
Tested by: pj
Modified:
trunk/main/rtp_engine.c
Modified: trunk/main/rtp_engine.c
URL: http://svn.digium.com/svn-view/asterisk/trunk/main/rtp_engine.c?view=diff&rev=186563&r1=186562&r2=186563
==============================================================================
--- trunk/main/rtp_engine.c (original)
+++ trunk/main/rtp_engine.c Mon Apr 6 08:23:12 2009
@@ -374,7 +374,7 @@
if ((address->sin_family != AF_INET) ||
(address->sin_port != instance->local_address.sin_port) ||
(address->sin_addr.s_addr != instance->local_address.sin_addr.s_addr)) {
- memcpy(address, &instance->local_address, sizeof(address));
+ memcpy(address, &instance->local_address, sizeof(*address));
return 1;
}
@@ -386,7 +386,7 @@
if ((address->sin_family != AF_INET) ||
(address->sin_port != instance->remote_address.sin_port) ||
(address->sin_addr.s_addr != instance->remote_address.sin_addr.s_addr)) {
- memcpy(address, &instance->remote_address, sizeof(address));
+ memcpy(address, &instance->remote_address, sizeof(*address));
return 1;
}
More information about the asterisk-commits
mailing list