Protect another g_memdup2 in exif.cc with ifdef
authorTomasz Golinski <tomaszg@math.uwb.edu.pl>
Mon, 15 May 2023 22:40:13 +0000 (00:40 +0200)
committerColin Clark <colin.clark@cclark.uk>
Tue, 16 May 2023 12:23:20 +0000 (13:23 +0100)
src/exif.cc

index 044d4bc..72eb389 100644 (file)
@@ -584,7 +584,11 @@ gchar *exif_item_get_data(ExifItem *item, guint *data_len)
 {
        if (data_len)
                *data_len = item->data_len;
+#if GLIB_CHECK_VERSION(2,68,0)
        return (gchar*)g_memdup2((gpointer)(item->data), item->data_len);
+#else
+       return (gchar*)g_memdup((gpointer)(item->data), item->data_len);
+#endif
 }
 
 guint exif_item_get_format_id(ExifItem *item)