notification: Use g_memdup2 when available

It's not really an issue here, as we use a properly typed len, but
better not to use a deprecated and potentially dangerous API.
This commit is contained in:
Marco Trevisan (Treviño) 2022-04-21 16:40:09 +02:00
parent 736fcea1d0
commit d5a888fa31
1 changed files with 4 additions and 0 deletions

View File

@ -1056,7 +1056,11 @@ notify_notification_set_hint_byte_array (NotifyNotification *notification,
g_return_if_fail (value != NULL || len == 0);
#ifdef GLIB_VERSION_2_68
value_dup = g_memdup2 (value, len);
#else
value_dup = g_memdup (value, len);
#endif
notify_notification_set_hint (notification, key,
g_variant_new_from_data (G_VARIANT_TYPE ("ay"),
value_dup,