]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
correct the behaviour in DN parsing. Return the correct size when requested.
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Sat, 28 May 2005 19:00:31 +0000 (19:00 +0000)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Sat, 28 May 2005 19:00:31 +0000 (19:00 +0000)
lib/x509/dn.c

index 93953751e2918473bd4b98b9ea87078277953e3e..5cd8f69fcbf97ce11db36fd8f8e53c7b28956cf8 100644 (file)
@@ -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;
     }