From 43f2c89a08dcf5fe1c4610c668bab56982febcbf Mon Sep 17 00:00:00 2001 From: Travis Cross Date: Mon, 25 Jun 2012 05:25:21 +0000 Subject: [PATCH] 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. --- libs/sofia-sip/libsofia-sip-ua/msg/msg.c | 4 ++-- libs/sofia-sip/libsofia-sip-ua/su/su_root.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/sofia-sip/libsofia-sip-ua/msg/msg.c b/libs/sofia-sip/libsofia-sip-ua/msg/msg.c index 264ca267f8..385188835d 100644 --- a/libs/sofia-sip/libsofia-sip-ua/msg/msg.c +++ b/libs/sofia-sip/libsofia-sip-ua/msg/msg.c @@ -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; diff --git a/libs/sofia-sip/libsofia-sip-ua/su/su_root.c b/libs/sofia-sip/libsofia-sip-ua/su/su_root.c index e2179714e0..47198948f3 100644 --- a/libs/sofia-sip/libsofia-sip-ua/su/su_root.c +++ b/libs/sofia-sip/libsofia-sip-ua/su/su_root.c @@ -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; }