]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
allow specifying NULL buffer in gnutls_x509_crt_get_*_unique_id()
authorNikos Mavrogiannopoulos <nmav@redhat.com>
Mon, 30 Nov 2015 08:49:08 +0000 (09:49 +0100)
committerNikos Mavrogiannopoulos <nmav@redhat.com>
Mon, 30 Nov 2015 08:49:22 +0000 (09:49 +0100)
lib/x509/x509.c

index cfc8ee1649fb9be9d175f131912661391c093ce5..d7cabdec42842e9b65abacbc14cdc7b04d807dd8 100644 (file)
@@ -3464,7 +3464,6 @@ gnutls_x509_crt_get_subject_unique_id(gnutls_x509_crt_t crt, char *buf,
 
        if (datum.size > *buf_size) {   /* then we're not going to fit */
                *buf_size = datum.size;
-               buf[0] = '\0';
                result = GNUTLS_E_SHORT_MEMORY_BUFFER;
        } else {
                *buf_size = datum.size;
@@ -3508,7 +3507,6 @@ gnutls_x509_crt_get_issuer_unique_id(gnutls_x509_crt_t crt, char *buf,
 
        if (datum.size > *buf_size) {   /* then we're not going to fit */
                *buf_size = datum.size;
-               buf[0] = '\0';
                result = GNUTLS_E_SHORT_MEMORY_BUFFER;
        } else {
                *buf_size = datum.size;