mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 18:21:04 +00:00
rtspsrc: Accept NULL for "port-range" property
The documentation of "port-range" implies that passing NULL should be valid, but currently it is not. Without this check, the sscanf() call will crash.
This commit is contained in:
parent
f52e16ceb8
commit
5dfd12b64c
1 changed files with 1 additions and 1 deletions
|
@ -1574,7 +1574,7 @@ gst_rtspsrc_set_property (GObject * object, guint prop_id, const GValue * value,
|
|||
const gchar *str;
|
||||
|
||||
str = g_value_get_string (value);
|
||||
if (sscanf (str, "%u-%u", &rtspsrc->client_port_range.min,
|
||||
if (str == NULL || 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;
|
||||
|
|
Loading…
Reference in a new issue