The g_memdup() routine was deprecated and (very) soon will become
obsolete. Use g_memdup2() when available, which is preferred for its
use of proper size data types.
This is inspired by pulseview commit
cf0109112932 which references the
https://discourse.gnome.org/t/port-your-module-from-g-memdup-to-g-memdup2-now/5538
article.