gst-plugins-good: rtspsrc: avoid NULL string comparison

Mark Nauwelaerts mnauw at kemper.freedesktop.org
Fri Jan 20 08:24:27 PST 2012


Module: gst-plugins-good
Branch: master
Commit: 018852ddc2638e464bf4d7158535c56610f039aa
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-good/commit/?id=018852ddc2638e464bf4d7158535c56610f039aa

Author: Mark Nauwelaerts <mark.nauwelaerts at collabora.co.uk>
Date:   Fri Jan 20 17:03:50 2012 +0100

rtspsrc: avoid NULL string comparison

---

 gst/rtsp/gstrtspsrc.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/gst/rtsp/gstrtspsrc.c b/gst/rtsp/gstrtspsrc.c
index cfdbea4..ffb04ed 100644
--- a/gst/rtsp/gstrtspsrc.c
+++ b/gst/rtsp/gstrtspsrc.c
@@ -4331,7 +4331,8 @@ gst_rtspsrc_parse_digest_challenge (GstRTSPConnection * conn,
     } else
       value = NULL;
 
-    if ((strcmp (item, "stale") == 0) && (strcmp (value, "TRUE") == 0))
+    if (item && (strcmp (item, "stale") == 0) &&
+        value && (strcmp (value, "TRUE") == 0))
       *stale = TRUE;
     gst_rtsp_connection_set_auth_param (conn, item, value);
     g_free (item);



More information about the gstreamer-commits mailing list