Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gstreamer: add gstpluginloader-win32 fix #1524

Merged
merged 1 commit into from
Jan 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
From a6eb1de87df4dd1438421acb49057b9577c610da Mon Sep 17 00:00:00 2001
From: Silvio Lazzeretti <[email protected]>
Date: Thu, 23 Jan 2025 16:52:30 +0100
Subject: [PATCH] gstpluginloader-win32: fix use after free in
find_helper_bin_location

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8352>

diff --git a/gst/gstpluginloader-win32.c b/gst/gstpluginloader-win32.c
--- a/gst/gstpluginloader-win32.c
+++ b/gst/gstpluginloader-win32.c
@@ -485,6 +485,7 @@ find_helper_bin_location (void)
if (plugin_subdir_depth < MAX_PATH_DEPTH) {
const char *filenamev[MAX_PATH_DEPTH + 5];
int i = 0, j;
+ gchar *helper_bin_location;

filenamev[i++] = relocated_libgstreamer;
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 "
"plugin dir: \'%s\', plugin scanner dir: \'%s\'",
GST_PLUGIN_SUBDIR, GST_PLUGIN_SCANNER_SUBDIR);
+ helper_bin_location = g_build_filenamev ((char **) filenamev);
g_free (relocated_libgstreamer);
- return g_build_filenamev ((char **) filenamev);
+ return helper_bin_location;
} else {
GST_WARNING ("GST_PLUGIN_SUBDIR: \'%s\' has too many path segments",
GST_PLUGIN_SUBDIR);
--
GitLab

3 changes: 3 additions & 0 deletions gvsbuild/projects/gstreamer.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ def __init__(self):
archive_url="https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-{version}.tar.xz",
hash="093a379602a250d5cd33b88e723757c80198317efde33893edf3c87b6e53b907",
dependencies=["meson", "ninja", "glib", "orc"],
patches=[
"gstpluginloader-win32-fix_use_after_free.patch",
],
)

if self.opts.enable_gi:
Expand Down
Loading