Skip to content

Commit

Permalink
topos: proper check if the last char in headr value is eol
Browse files Browse the repository at this point in the history
  • Loading branch information
miconda committed Sep 6, 2016
1 parent 5bc9394 commit b933550
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/topos/tps_msg.c
Expand Up @@ -166,7 +166,7 @@ int tps_add_headers(sip_msg_t *msg, str *hname, str *hbody, int hpos)
memcpy(hs.s + hname->len + 2, hbody->s, hbody->len);

/* add end of header if not present */
if(hs.s[hname->len + 2 + hbody->len]!='\n') {
if(hs.s[hname->len + 2 + hbody->len - 1]!='\n') {
hs.s[hname->len + 2 + hbody->len] = '\r';
hs.s[hname->len + 2 + hbody->len+1] = '\n';
hs.len += 2;
Expand Down

0 comments on commit b933550

Please sign in to comment.