Fix RTSP strncpy buffer overflow

This commit is contained in:
Theo Arends
2026-06-10 14:35:35 +02:00
parent 9afaef377e
commit c15ea2852e
3 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -63,7 +63,7 @@ bool CRtspSession::ParseRtspRequest(char const * aRequest, unsigned aRequestSize
{
Length = 128;
}
strncpy(CP,ClientPortPtr, Length);
strlcpy(CP,ClientPortPtr, Length);
pCP = strstr(CP,"=");
if (pCP != nullptr)
{