From aa3e97d67c05d4648ea58c7ff7675e24a81ca72b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= <sebastian@centricular.com>
Date: Thu, 24 Oct 2024 20:12:55 +0300
Subject: [PATCH] rtsp-server: Remove pointless assertions that can happen if
 client provides invalid rates

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3731
Fixes CVE-2024-44331

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7739>

CVE: CVE-2024-44331

Upstream-Status: Backport [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/commit/aa3e97d67c05d4648ea58c7ff7675e24a81ca72b]

Signed-off-by: Archana Polampalli <archana.polampalli@windriver.com>
---
 gst/rtsp-server/rtsp-media.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/gst/rtsp-server/rtsp-media.c b/gst/rtsp-server/rtsp-media.c
index 8c62b0d..cbdc9f9 100644
--- a/gst/rtsp-server/rtsp-media.c
+++ b/gst/rtsp-server/rtsp-media.c
@@ -2755,15 +2755,13 @@ gst_rtsp_media_get_rates (GstRTSPMedia * media, gdouble * rate,
           first_stream = FALSE;
         } else {
           if (save_rate != *rate || save_applied_rate != *applied_rate) {
-            /* diffrent rate or applied_rate, weird */
-            g_assert (FALSE);
+            /* different rate or applied_rate, weird */
             result = FALSE;
             break;
           }
         }
       } else {
-        /* complete stream withot rate and applied_rate, weird */
-        g_assert (FALSE);
+        /* complete stream without rate and applied_rate, weird */
         result = FALSE;
         break;
       }
--
2.40.0
