From: Nikos Mavrogiannopoulos Date: Mon, 30 Nov 2015 08:49:08 +0000 (+0100) Subject: allow specifying NULL buffer in gnutls_x509_crt_get_*_unique_id() X-Git-Tag: gnutls_3_5_0~508 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0728300bbf8086edb26ca82792be0d2a534db69e;p=thirdparty%2Fgnutls.git allow specifying NULL buffer in gnutls_x509_crt_get_*_unique_id() --- diff --git a/lib/x509/x509.c b/lib/x509/x509.c index cfc8ee1649..d7cabdec42 100644 --- a/lib/x509/x509.c +++ b/lib/x509/x509.c @@ -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;