Skip to content
Snippets Groups Projects
Commit 22dd9bb6 authored by Tristan Matthews's avatar Tristan Matthews
Browse files

* #9847: SDP: avoid buffer overflow

parent c7fe1e29
No related branches found
No related tags found
No related merge requests found
......@@ -227,7 +227,7 @@ namespace {
{
char buffer[2048];
size_t size = pjmedia_sdp_print(session, buffer, sizeof(buffer));
std::string sessionStr(buffer, size);
std::string sessionStr(buffer, std::min(size, sizeof(buffer)));
DEBUG("%s", sessionStr.c_str());
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment