diff --git a/giconstantinfo.c b/giconstantinfo.c index c18a9d3fc..a9d4cbc02 100644 --- a/giconstantinfo.c +++ b/giconstantinfo.c @@ -128,7 +128,15 @@ g_constant_info_get_value (GIConstantInfo *info, if (blob->type.flags.reserved == 0 && blob->type.flags.reserved2 == 0) { if (blob->type.flags.pointer) - value->v_pointer = g_memdup (&rinfo->typelib->data[blob->offset], blob->size); + { +#if GLIB_CHECK_VERSION (2, 67, 5) + gsize blob_size = blob->size; + + value->v_pointer = g_memdup2 (&rinfo->typelib->data[blob->offset], blob_size); +#else + value->v_pointer = g_memdup (&rinfo->typelib->data[blob->offset], blob->size); +#endif + } else { switch (blob->type.flags.tag)