[sr-dev] git:master:68a0d66e: dialog: proper safety test if cseq value in via is larger than hdr

Daniel-Constantin Mierla miconda at gmail.com
Tue Aug 30 17:32:20 CEST 2016


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

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2016-08-30T16:43:15+02:00

dialog: proper safety test if cseq value in via is larger than hdr

---

Modified: modules/dialog/dlg_cseq.c

---

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

---

diff --git a/modules/dialog/dlg_cseq.c b/modules/dialog/dlg_cseq.c
index ad915bd..b74cb4e 100644
--- a/modules/dialog/dlg_cseq.c
+++ b/modules/dialog/dlg_cseq.c
@@ -291,9 +291,9 @@ int dlg_cseq_msg_received(void *data)
 	}
 	LM_DBG("via cseq cookie [%.*s] val [%.*s]\n", vcseq.len, vcseq.s,
 			vcseq.len-3, vcseq.s+3);
-	if(vcseq.len-3<get_cseq(&msg)->number.len) {
+	if(vcseq.len-3>get_cseq(&msg)->number.len) {
 		/* higher lenght to update - wrong */
-		LM_DBG("cseq in message (%d) longer than in via (%d)\n",
+		LM_DBG("cseq in message (%d) shorter than in via (%d)\n",
 				get_cseq(&msg)->number.len, vcseq.len-3);
 		goto done;
 	}




More information about the sr-dev mailing list