[sr-dev] git:master:e913fa83: Merge pull request #1628 from rromrrom/crash_on_empty_string

GitHub noreply at github.com
Fri Aug 31 11:24:43 CEST 2018


Module: kamailio
Branch: master
Commit: e913fa83f87b34e236817b8db60341fe5a193a3d
URL: https://github.com/kamailio/kamailio/commit/e913fa83f87b34e236817b8db60341fe5a193a3d

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: GitHub <noreply at github.com>
Date: 2018-08-31T11:24:38+02:00

Merge pull request #1628 from rromrrom/crash_on_empty_string

tm: crash on memcpy fix

---

Modified: src/modules/tm/t_reply.c

---

Diff:  https://github.com/kamailio/kamailio/commit/e913fa83f87b34e236817b8db60341fe5a193a3d.diff
Patch: https://github.com/kamailio/kamailio/commit/e913fa83f87b34e236817b8db60341fe5a193a3d.patch

---

diff --git a/src/modules/tm/t_reply.c b/src/modules/tm/t_reply.c
index 2f5488a309..271932c90c 100644
--- a/src/modules/tm/t_reply.c
+++ b/src/modules/tm/t_reply.c
@@ -299,6 +299,7 @@ inline static int update_totag_set(struct cell *t, struct sip_msg *ok)
 
 	for (i=t->fwded_totags; i; i=i->next) {
 		if (i->tag.len==tag->len
+				&& i->tag.s
 				&& memcmp(i->tag.s, tag->s, tag->len) ==0 ){
 			/* to tag already recorded */
 			LM_DBG("to-tag retransmission\n");




More information about the sr-dev mailing list