Module: kamailio
Branch: master
Commit: 92f33c4488725a85921b3b66010f64c5bdfec802
URL:
https://github.com/kamailio/kamailio/commit/92f33c4488725a85921b3b66010f64c…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2020-06-30T12:17:50+02:00
sl: check if ending zero fits when printing cseq
---
Modified: src/modules/sl/sl_funcs.c
---
Diff:
https://github.com/kamailio/kamailio/commit/92f33c4488725a85921b3b66010f64c…
Patch:
https://github.com/kamailio/kamailio/commit/92f33c4488725a85921b3b66010f64c…
---
diff --git a/src/modules/sl/sl_funcs.c b/src/modules/sl/sl_funcs.c
index e6f643c861..86ad65c5e8 100644
--- a/src/modules/sl/sl_funcs.c
+++ b/src/modules/sl/sl_funcs.c
@@ -267,7 +267,7 @@ int sl_reply_helper(struct sip_msg *msg, int code, char *reason, str
*tag)
len = snprintf(tmp, tsize, "0 %.*s\r\n",
msg->first_line.u.request.method.len,
msg->first_line.u.request.method.s);
- if(len<0 || len>tsize) {
+ if(len<0 || len>=tsize) {
LM_ERR("failed to print the tmp cseq\n");
pkg_free(tmp);
pkg_free(cseqb);