mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-19 00:01:23 +00:00
benchmarks: Fix potential stack corruption in capsnego test
flavour_str is a non-const pointer that will be written to if the -f option is passed
This commit is contained in:
parent
59885c2a92
commit
6e01d03d90
1 changed files with 3 additions and 1 deletions
|
@ -185,7 +185,7 @@ gint
|
|||
main (gint argc, gchar * argv[])
|
||||
{
|
||||
/* default parameters */
|
||||
const gchar *flavour_str = "audio";
|
||||
gchar *flavour_str = g_strdup("audio");
|
||||
gint flavour = FLAVOUR_AUDIO;
|
||||
gint children = 3;
|
||||
gint depth = 4;
|
||||
|
@ -230,6 +230,8 @@ main (gint argc, gchar * argv[])
|
|||
/* build pipeline */
|
||||
g_print ("building %s pipeline with depth = %d and children = %d\n",
|
||||
flavour_str, depth, children);
|
||||
g_free (flavour_str);
|
||||
|
||||
start = gst_util_get_timestamp ();
|
||||
bin = GST_BIN (gst_pipeline_new ("pipeline"));
|
||||
sink = gst_element_factory_make ("fakesink", NULL);
|
||||
|
|
Loading…
Reference in a new issue