mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-10-06 10:42:22 +00:00
rtsp-session-pool: Make sure session IDs are properly URI-escaped
https://bugzilla.gnome.org/show_bug.cgi?id=643812
This commit is contained in:
parent
fcad523dd7
commit
935e8f852d
1 changed files with 3 additions and 2 deletions
|
@ -293,7 +293,7 @@ gst_rtsp_session_pool_find (GstRTSPSessionPool * pool, const gchar * sessionid)
|
||||||
static gchar *
|
static gchar *
|
||||||
create_session_id (GstRTSPSessionPool * pool)
|
create_session_id (GstRTSPSessionPool * pool)
|
||||||
{
|
{
|
||||||
gchar id[16];
|
gchar id[17];
|
||||||
gint i;
|
gint i;
|
||||||
|
|
||||||
for (i = 0; i < 16; i++) {
|
for (i = 0; i < 16; i++) {
|
||||||
|
@ -301,8 +301,9 @@ create_session_id (GstRTSPSessionPool * pool)
|
||||||
session_id_charset[g_random_int_range (0,
|
session_id_charset[g_random_int_range (0,
|
||||||
G_N_ELEMENTS (session_id_charset))];
|
G_N_ELEMENTS (session_id_charset))];
|
||||||
}
|
}
|
||||||
|
id[16] = 0;
|
||||||
|
|
||||||
return g_strndup (id, 16);
|
return g_uri_escape_string (id, NULL, FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstRTSPSession *
|
static GstRTSPSession *
|
||||||
|
|
Loading…
Reference in a new issue