Module: kamailio
Branch: master
Commit: e913fa83f87b34e236817b8db60341fe5a193a3d
URL:
https://github.com/kamailio/kamailio/commit/e913fa83f87b34e236817b8db60341f…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: GitHub <noreply(a)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/e913fa83f87b34e236817b8db60341f…
Patch:
https://github.com/kamailio/kamailio/commit/e913fa83f87b34e236817b8db60341f…
---
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");