From fb952e3470dc2d9483562123c2862c619b6ea6e5 Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Mon, 9 Oct 2017 14:17:25 +0200 Subject: [PATCH] rtspsrc: Avoid potentially dereferencing NULL pointer CID 1418986 --- gst/rtsp/gstrtspsrc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gst/rtsp/gstrtspsrc.c b/gst/rtsp/gstrtspsrc.c index 6cd7902..928c359 100644 --- a/gst/rtsp/gstrtspsrc.c +++ b/gst/rtsp/gstrtspsrc.c @@ -5746,7 +5746,8 @@ gst_rtspsrc_send (GstRTSPSrc * src, GstRTSPConnInfo * conninfo, break; case GST_RTSP_STS_RTSP_VERSION_NOT_SUPPORTED: GST_INFO_OBJECT (src, "Version %s not supported by the server", - gst_rtsp_version_as_text (versions[version_retry])); + versions ? gst_rtsp_version_as_text (versions[version_retry]) : + "unknown"); if (versions && versions[version_retry] != GST_RTSP_VERSION_INVALID) { GST_INFO_OBJECT (src, "Unsupported version %s => trying %s", gst_rtsp_version_as_text (request->type_data.request.version), -- 2.7.4