Skip to content

Commit

Permalink
Add newline for SIP headers that are overflown in length (#3184)
Browse files Browse the repository at this point in the history
  • Loading branch information
zayim committed Apr 18, 2023
1 parent 93dfd84 commit 1be58ce
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/plugins/janus_sip.c
Expand Up @@ -1620,9 +1620,10 @@ static void janus_sip_parse_custom_headers(json_t *root, char *custom_headers, s
continue;
}
char h[255];
g_snprintf(h, 255, "%s: %s\r\n", key, json_string_value(value));
g_snprintf(h, 255, "%s: %s", key, json_string_value(value));
JANUS_LOG(LOG_VERB, "Adding custom header, %s\n", h);
janus_strlcat(custom_headers, h, size);
janus_strlcat(custom_headers, h, size - 2);
janus_strlcat(custom_headers, "\r\n", size);
iter = json_object_iter_next(headers, iter);
}
}
Expand Down

0 comments on commit 1be58ce

Please sign in to comment.