mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2026-02-16 02:21:07 +00:00
Fix buffer overflow in performRtspHandshake (CVE-2023-42800)
This commit is contained in:
committed by
Cameron Gutman
parent
02b7742f4d
commit
24750d4b74
@@ -776,7 +776,8 @@ int performRtspHandshake(PSERVER_INFORMATION serverInfo) {
|
||||
(StreamConfig.streamingRemotely != STREAM_CFG_REMOTE || CHANNEL_COUNT_FROM_AUDIO_CONFIGURATION(StreamConfig.audioConfiguration) <= 2)) {
|
||||
// If we have an RTSP URL string and it was successfully parsed, use that string
|
||||
if (serverInfo->rtspSessionUrl != NULL && parseUrlAddrFromRtspUrlString(serverInfo->rtspSessionUrl, urlAddr, sizeof(urlAddr))) {
|
||||
strcpy(rtspTargetUrl, serverInfo->rtspSessionUrl);
|
||||
PltSafeStrcpy(rtspTargetUrl, sizeof(rtspTargetUrl), serverInfo->rtspSessionUrl);
|
||||
rtspTargetUrl[sizeof(rtspTargetUrl) - 1] = '\0';
|
||||
}
|
||||
else {
|
||||
// If an RTSP URL string was not provided or failed to parse, we will construct one now as best we can.
|
||||
|
||||
Reference in New Issue
Block a user