Browse Source

* modules/lcr: check that r-uri user exists

* Added check to load_gws() function that Request-URI user exists.
  Credits to Andrew Pogrebennyk.
Juha Heinanen 16 years ago
parent
commit
64321a99fa
1 changed files with 3 additions and 3 deletions
  1. 3 3
      modules/lcr/lcr_mod.c

+ 3 - 3
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;