Skip to content

Commit

Permalink
sl: check if ending zero fits when printing cseq
Browse files Browse the repository at this point in the history
  • Loading branch information
miconda committed Jun 30, 2020
1 parent 1d25629 commit 92f33c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/modules/sl/sl_funcs.c
Expand Up @@ -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);
Expand Down

0 comments on commit 92f33c4

Please sign in to comment.