Replace g_memdup with safer g_memdup2
authorTomasz Golinski <tomaszg@math.uwb.edu.pl>
Mon, 15 May 2023 21:57:13 +0000 (23:57 +0200)
committerColin Clark <colin.clark@cclark.uk>
Tue, 16 May 2023 12:23:20 +0000 (13:23 +0100)
commit7ae0619cfc6c8d6d30e259022c60c150b8f4318e
treeec35c28b9a16024ce47997f9518377e5edea9b92
parent6ffd576d9a70db1c113a1b911da4e07259069652
Replace g_memdup with safer g_memdup2

g_memdup is declared as deprecated in current GLib, safer replacement g_memdup2 is available since GLib-2.68.

Code is protected by GLIB_CHECK_VERSION macro, so should build on older distros as well.

See https://docs.gtk.org/glib/func.memdup2.html
src/exiv2.cc