Skip to content

Commit

Permalink
Fix: Use g_memdup2 instead of the deprecated g_memdup
Browse files Browse the repository at this point in the history
Merge pull request #1825 from timopollmeier/use-g_memdup2
  • Loading branch information
timopollmeier authored May 16, 2022
2 parents 7b16d2e + 5e6a790 commit 4ad2491
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/manage.c
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,11 @@ get_certificate_info (const gchar* certificate, gssize certificate_len,
return -1;
}

#if GLIB_CHECK_VERSION(2, 68, 0)
cert_truncated = g_memdup2 (certificate, certificate_len);
#else
cert_truncated = g_memdup (certificate, certificate_len);
#endif
certificate_format_internal = GNUTLS_X509_FMT_DER;
}

Expand Down

0 comments on commit 4ad2491

Please sign in to comment.