diff options
author | Marco Trevisan (Treviño) <mail@3v1n0.net> | 2022-04-21 16:40:09 +0200 |
---|---|---|
committer | Marco Trevisan (Treviño) <mail@3v1n0.net> | 2022-04-21 23:53:44 +0200 |
commit | d5a888fa3130d2d05bf045c9ef90a3beaac54be8 (patch) | |
tree | cdd41bb8cac970b440a64675c6c461ac43b0b4fb | |
parent | 736fcea1d0377e6082e7cf738c3cd7cd42b3c1a0 (diff) | |
download | libnotify-d5a888fa3130d2d05bf045c9ef90a3beaac54be8.tar.gz |
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.
-rw-r--r-- | libnotify/notification.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libnotify/notification.c b/libnotify/notification.c index 1c442db..55cc46f 100644 --- a/libnotify/notification.c +++ b/libnotify/notification.c @@ -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, |