mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-30 04:00:37 +00:00
rtspclientsink: Check return value of sscanf
And just make sure we always have 0/0 if we have an error CID #1352031
This commit is contained in:
parent
fe5f8077c1
commit
2639fbdb7f
1 changed files with 3 additions and 5 deletions
|
@ -1345,11 +1345,9 @@ gst_rtsp_client_sink_set_property (GObject * object, guint prop_id,
|
|||
const gchar *str;
|
||||
|
||||
str = g_value_get_string (value);
|
||||
if (str) {
|
||||
sscanf (str, "%u-%u",
|
||||
&rtsp_client_sink->client_port_range.min,
|
||||
&rtsp_client_sink->client_port_range.max);
|
||||
} else {
|
||||
if (!str || !sscanf (str, "%u-%u",
|
||||
&rtsp_client_sink->client_port_range.min,
|
||||
&rtsp_client_sink->client_port_range.max)) {
|
||||
rtsp_client_sink->client_port_range.min = 0;
|
||||
rtsp_client_sink->client_port_range.max = 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue