Browse Source

usrloc: safety check for debug message printing path value from rpc add command

- reported and patch by Thomas Arimont, FS#467
Daniel-Constantin Mierla 11 years ago
parent
commit
b1ba03f1fe
1 changed files with 1 additions and 1 deletions
  1. 1 1
      modules/usrloc/ul_rpc.c

+ 1 - 1
modules/usrloc/ul_rpc.c

@@ -552,7 +552,7 @@ static void ul_rpc_add(rpc_t* rpc, void* ctx)
 	}
 	LM_DBG("ret: %d table:%.*s aor:%.*s contact:%.*s expires:%d dtemp:%f path:%.*s flags:%d bflags:%d methods:%d\n",
 		ret, table.len, table.s, aor.len, aor.s, contact.len, contact.s,
-		(int) ci.expires, dtemp, ci.path->len, ci.path->s, ci.flags, ci.cflags, (int) ci.methods);
+		(int) ci.expires, dtemp, (ci.path)?ci.path->len:0, (ci.path && ci.path->s)?ci.path->s:"", ci.flags, ci.cflags, (int) ci.methods);
 	if ( ret != 9) {
 		rpc->fault(ctx, 500, "Not enough parameters or wrong format");
 		return;