From: Nikos Mavrogiannopoulos Date: Sat, 28 May 2005 19:00:31 +0000 (+0000) Subject: correct the behaviour in DN parsing. Return the correct size when requested. X-Git-Tag: gnutls_1_2_5~30 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aad3bf3e1dd96fb672481bc8a2fb6fc1f22e499a;p=thirdparty%2Fgnutls.git correct the behaviour in DN parsing. Return the correct size when requested. --- diff --git a/lib/x509/dn.c b/lib/x509/dn.c index 93953751e2..5cd8f69fcb 100644 --- a/lib/x509/dn.c +++ b/lib/x509/dn.c @@ -282,7 +282,7 @@ int _gnutls_x509_parse_dn(ASN1_TYPE asn1_struct, if (out_str.length >= (unsigned int) *sizeof_buf) { gnutls_assert(); - *sizeof_buf = out_str.length; + *sizeof_buf = out_str.length + 1; result = GNUTLS_E_SHORT_MEMORY_BUFFER; goto cleanup; }