Module: sip-router Branch: master Commit: 64321a99fa882dd60a473dbfb3cc8e589a1c139b URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=64321a99...
Author: Juha Heinanen jh@tutpro.com Committer: Juha Heinanen jh@tutpro.com Date: Sat Jun 27 17:13:30 2009 +0300
* modules/lcr: check that r-uri user exists
* Added check to load_gws() function that Request-URI user exists. Credits to Andrew Pogrebennyk.
---
modules/lcr/lcr_mod.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/modules/lcr/lcr_mod.c b/modules/lcr/lcr_mod.c index d3e9d17..b75ab0f 100644 --- a/modules/lcr/lcr_mod.c +++ b/modules/lcr/lcr_mod.c @@ -1713,9 +1713,9 @@ static int load_gws(struct sip_msg* _m, char *_lcr_id, char *_from_uri) lcrs = lcrtp[lcr_id];
/* Find Request-URI user */ - if (parse_sip_msg_uri(_m) < 0) { - LM_ERR("error while parsing R-URI\n"); - return -1; + if ((parse_sip_msg_uri(_m) < 0) || (!_m->parsed_uri.user.s)) { + LM_ERR("error while parsing R-URI\n"); + return -1; } ruri_user = _m->parsed_uri.user;