mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-31 03:29:50 +00:00
gstpluginloader-win32: fix use after free in find_helper_bin_location
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8352>
This commit is contained in:
parent
0b92e04142
commit
a6eb1de87d
1 changed files with 3 additions and 1 deletions
|
@ -485,6 +485,7 @@ find_helper_bin_location (void)
|
||||||
if (plugin_subdir_depth < MAX_PATH_DEPTH) {
|
if (plugin_subdir_depth < MAX_PATH_DEPTH) {
|
||||||
const char *filenamev[MAX_PATH_DEPTH + 5];
|
const char *filenamev[MAX_PATH_DEPTH + 5];
|
||||||
int i = 0, j;
|
int i = 0, j;
|
||||||
|
gchar *helper_bin_location;
|
||||||
|
|
||||||
filenamev[i++] = relocated_libgstreamer;
|
filenamev[i++] = relocated_libgstreamer;
|
||||||
for (j = 0; j < plugin_subdir_depth; j++)
|
for (j = 0; j < plugin_subdir_depth; j++)
|
||||||
|
@ -498,8 +499,9 @@ find_helper_bin_location (void)
|
||||||
GST_DEBUG ("constructing path to system plugin scanner using "
|
GST_DEBUG ("constructing path to system plugin scanner using "
|
||||||
"plugin dir: \'%s\', plugin scanner dir: \'%s\'",
|
"plugin dir: \'%s\', plugin scanner dir: \'%s\'",
|
||||||
GST_PLUGIN_SUBDIR, GST_PLUGIN_SCANNER_SUBDIR);
|
GST_PLUGIN_SUBDIR, GST_PLUGIN_SCANNER_SUBDIR);
|
||||||
|
helper_bin_location = g_build_filenamev ((char **) filenamev);
|
||||||
g_free (relocated_libgstreamer);
|
g_free (relocated_libgstreamer);
|
||||||
return g_build_filenamev ((char **) filenamev);
|
return helper_bin_location;
|
||||||
} else {
|
} else {
|
||||||
GST_WARNING ("GST_PLUGIN_SUBDIR: \'%s\' has too many path segments",
|
GST_WARNING ("GST_PLUGIN_SUBDIR: \'%s\' has too many path segments",
|
||||||
GST_PLUGIN_SUBDIR);
|
GST_PLUGIN_SUBDIR);
|
||||||
|
|
Loading…
Reference in a new issue