]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
gnutls_x509_crt_get_key_purpose_oid: copy the OID as a null-terminated string
authorNikos Mavrogiannopoulos <nmav@redhat.com>
Wed, 13 Apr 2016 07:03:56 +0000 (09:03 +0200)
committerNikos Mavrogiannopoulos <nmav@redhat.com>
Wed, 13 Apr 2016 09:30:26 +0000 (11:30 +0200)
lib/x509/x509.c

index a5de08c86264f8ba78eb8b28418c1e195776ecf6..fae63e09d9a7721f1a46b182af8d78f06c021260 100644 (file)
@@ -3046,7 +3046,7 @@ gnutls_x509_crt_get_key_purpose_oid(gnutls_x509_crt_t cert,
                goto cleanup;
        }
 
-       ret = _gnutls_copy_data(&out, oid, oid_size);
+       ret = _gnutls_copy_string(&out, oid, oid_size);
        if (ret < 0) {
                gnutls_assert();
                goto cleanup;