mirror of
https://github.com/brl/mutter.git
synced 2025-08-04 15:45:54 +00:00
Change all g_memdup() to g_memdup2()
Using g_memdup() is dangerous due to the type of the size argument. See https://gitlab.gnome.org/GNOME/glib/-/issues/2319 and https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1926 for details. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1708>
This commit is contained in:
@@ -2549,7 +2549,7 @@ meta_display_manage_all_xwindows (MetaDisplay *display)
|
||||
meta_stack_tracker_get_stack (display->stack_tracker, &_children, &n_children);
|
||||
|
||||
/* Copy the stack as it will be modified as part of the loop */
|
||||
children = g_memdup (_children, sizeof (guint64) * n_children);
|
||||
children = g_memdup2 (_children, sizeof (uint64_t) * n_children);
|
||||
|
||||
for (i = 0; i < n_children; ++i)
|
||||
{
|
||||
|
Reference in New Issue
Block a user