From: Luis de Bethencourt Date: Mon, 14 Dec 2015 14:19:05 +0000 (+0000) Subject: rtspsrc: check port-range format X-Git-Tag: 1.10.4~701 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4735d2a9a587228628b4fec1b1b953c9dbaa7cb9;p=platform%2Fupstream%2Fgst-plugins-good.git rtspsrc: check port-range format The string could exist but with a wrong format, in that case we still want to reset the values of client_port_range.min and max like we do if there is no string. CID 1139593 --- diff --git a/gst/rtsp/gstrtspsrc.c b/gst/rtsp/gstrtspsrc.c index 76b98e2..9f806ec 100644 --- a/gst/rtsp/gstrtspsrc.c +++ b/gst/rtsp/gstrtspsrc.c @@ -1108,10 +1108,8 @@ gst_rtspsrc_set_property (GObject * object, guint prop_id, const GValue * value, const gchar *str; str = g_value_get_string (value); - if (str) { - sscanf (str, "%u-%u", - &rtspsrc->client_port_range.min, &rtspsrc->client_port_range.max); - } else { + if (sscanf (str, "%u-%u", &rtspsrc->client_port_range.min, + &rtspsrc->client_port_range.max) != 2) { rtspsrc->client_port_range.min = 0; rtspsrc->client_port_range.max = 0; }