From 13e21bff6a6a8db4da71bcfcc331224733a064ea Mon Sep 17 00:00:00 2001 From: ns6089 <61738816+ns6089@users.noreply.github.com> Date: Tue, 15 Oct 2024 15:36:32 +0300 Subject: [PATCH] Guard against rtsp response with no content --- src/RtspConnection.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/RtspConnection.c b/src/RtspConnection.c index 01b15b1..60d5bf4 100644 --- a/src/RtspConnection.c +++ b/src/RtspConnection.c @@ -1059,6 +1059,12 @@ int performRtspHandshake(PSERVER_INFORMATION serverInfo) { ret = response.message.response.statusCode; goto Exit; } + + if (!response.payload) { + Limelog("RTSP DESCRIBE no content in response\n"); + ret = -1; + goto Exit; + } if ((StreamConfig.supportedVideoFormats & VIDEO_FORMAT_MASK_AV1) && strstr(response.payload, "AV1/90000")) { if ((serverInfo->serverCodecModeSupport & SCM_AV1_HIGH10_444) && (StreamConfig.supportedVideoFormats & VIDEO_FORMAT_AV1_HIGH10_444)) {