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:
@ -666,7 +666,7 @@ meta_input_settings_native_set_tablet_aspect_ratio (MetaInputSettings *settings
|
||||
|
||||
task = g_task_new (device, NULL, NULL, NULL);
|
||||
g_task_set_task_data (task,
|
||||
g_memdup (&aspect_ratio, sizeof (double)),
|
||||
g_memdup2 (&aspect_ratio, sizeof (double)),
|
||||
g_free);
|
||||
|
||||
input_settings_native = META_INPUT_SETTINGS_NATIVE (settings);
|
||||
|
Reference in New Issue
Block a user