Browse code

sl: check if ending zero fits when printing cseq

Daniel-Constantin Mierla authored on 30/06/2020 10:17:50
Showing 1 changed files
... ...
@@ -267,7 +267,7 @@ int sl_reply_helper(struct sip_msg *msg, int code, char *reason, str *tag)
267 267
 				len = snprintf(tmp, tsize, "0 %.*s\r\n",
268 268
 						msg->first_line.u.request.method.len,
269 269
 						msg->first_line.u.request.method.s);
270
-				if(len<0 || len>tsize) {
270
+				if(len<0 || len>=tsize) {
271 271
 					LM_ERR("failed to print the tmp cseq\n");
272 272
 					pkg_free(tmp);
273 273
 					pkg_free(cseqb);