[sr-dev] git:master: core: msg_ldata_t field is memset to 0 in the shm clone

Daniel-Constantin Mierla miconda at gmail.com
Thu Sep 19 15:51:20 CEST 2013


Module: sip-router
Branch: master
Commit: 7730b5c3cf6b889f34de6004ce87341c746968ca
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=7730b5c3cf6b889f34de6004ce87341c746968ca

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date:   Thu Sep 19 15:50:29 2013 +0200

core: msg_ldata_t field is memset to 0 in the shm clone

---

 sip_msg_clone.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/sip_msg_clone.c b/sip_msg_clone.c
index 6a5da1a..1bb55ee 100644
--- a/sip_msg_clone.c
+++ b/sip_msg_clone.c
@@ -550,6 +550,8 @@ struct sip_msg*  sip_msg_shm_clone( struct sip_msg *org_msg, int *sip_msg_len,
 	new_msg->location_ua.len=0;
 	/* reg_id is not cloned (it's reset instead) */
 	new_msg->reg_id=0;
+	/* local data struct is not cloned (it's reset instead) */
+	memset(&new_msg->ldv, 0, sizeof(msg_ldata_t));
 	/* message buffers(org and scratch pad) */
 	memcpy( p , org_msg->buf, org_msg->len);
 	/* ZT to be safer */




More information about the sr-dev mailing list