Fix memset calls in sofia-sip
These calls were zeroing only a pointer's worth of memory rather than the actual size of the objects.
This commit is contained in:
parent
7086a92f9b
commit
43f2c89a08
|
@ -242,8 +242,8 @@ msg_mclass_t const *msg_mclass(msg_t const *msg)
|
|||
*/
|
||||
void msg_addr_zero(msg_t *msg)
|
||||
{
|
||||
memset(&msg->m_addr, 0, sizeof(&msg->m_addr));
|
||||
memset(&msg->m_addrinfo, 0, sizeof(&msg->m_addrinfo));
|
||||
memset(&msg->m_addr, 0, sizeof(msg->m_addr));
|
||||
memset(&msg->m_addrinfo, 0, sizeof(msg->m_addrinfo));
|
||||
|
||||
msg->m_addrinfo.ai_addrlen = sizeof(msg->m_addr);
|
||||
msg->m_addrinfo.ai_addr = &msg->m_addr->su_sa;
|
||||
|
|
|
@ -152,7 +152,7 @@ _su_task_r su_task_init(su_task_r task)
|
|||
{
|
||||
assert(task);
|
||||
|
||||
memset(task, 0, sizeof(task));
|
||||
memset(task, 0, sizeof(su_task_r));
|
||||
return task;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue