[sr-dev] git:master: tmx: be sure From header is parsed before accessing the tag
Daniel-Constantin Mierla
miconda at gmail.com
Tue Aug 19 11:12:28 CEST 2014
Module: sip-router
Branch: master
Commit: 92ff234d8b39c422aca683d4fbb0cfacc24a77b4
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=92ff234d8b39c422aca683d4fbb0cfacc24a77b4
Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: Tue Aug 19 11:10:14 2014 +0200
tmx: be sure From header is parsed before accessing the tag
- reported by Juha Heinanen
---
modules/tmx/tmx_pretran.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/modules/tmx/tmx_pretran.c b/modules/tmx/tmx_pretran.c
index 3483c32..653f64c 100644
--- a/modules/tmx/tmx_pretran.c
+++ b/modules/tmx/tmx_pretran.c
@@ -213,6 +213,10 @@ int tmx_check_pretran(sip_msg_t *msg)
LM_ERR("failed to get Via header\n");
return -1;
}
+ if (parse_from_header(msg)<0 || get_from(msg)->tag_value.len==0) {
+ LM_ERR("failed to get From header\n");
+ return -1;
+ }
vbr = msg->via1->branch;
More information about the sr-dev
mailing list