2
0
Эх сурвалжийг харах

siptrace: don't attempt to get reply reason for ack

- for sl filtered ack, execution of sl callback attempted to set the len
  of reply reason, which does not exist in this case
- reported by MÉSZÁROS Mihály
Daniel-Constantin Mierla 15 жил өмнө
parent
commit
f7630be368
1 өөрчлөгдсөн 4 нэмэгдсэн , 1 устгасан
  1. 4 1
      modules/sl/sl_funcs.c

+ 4 - 1
modules/sl/sl_funcs.c

@@ -397,7 +397,10 @@ void sl_run_callbacks(unsigned int type, struct sip_msg *req,
 	param.req    = req;
 	param.code   = code;
 	sreason.s    = reason;
-	sreason.len  = strlen(reason);
+	if(reason)
+		sreason.len  = strlen(reason);
+	else
+		sreason.len  = 0;
 	param.reason = &sreason;
 	param.reply  = reply;
 	param.dst    = dst;