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 git-svn-id: http://svn.digium.com/svn/asterisk/trunk@186563 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
parent
2a421d5327
commit
c1a373b82e
|
@ -374,7 +374,7 @@ int ast_rtp_instance_get_local_address(struct ast_rtp_instance *instance, struct
|
|||
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 @@ int ast_rtp_instance_get_remote_address(struct ast_rtp_instance *instance, struc
|
|||
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;
|
||||
}
|
||||
|
||||
|
|
Reference in New Issue