]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
(_gnutls_x509_parse_dn): Return buffer size, not string size, in
authorSimon Josefsson <simon@josefsson.org>
Wed, 5 Jan 2005 18:55:21 +0000 (18:55 +0000)
committerSimon Josefsson <simon@josefsson.org>
Wed, 5 Jan 2005 18:55:21 +0000 (18:55 +0000)
*sizeof_buf.  Reported by Martin Lambers <marlam@web.de>.

lib/x509/dn.c

index bf3c0f5cf389c6f99d44758dc97397979d69aead..d5c9f1b1e7829f9c5858d7a0c0a497f0cf39cdaf 100644 (file)
@@ -1,6 +1,6 @@
 /*
+ *  Copyright (C) 2004, 2005  Free Software Foundation
  *  Copyright (C) 2003 Nikos Mavroyanopoulos
- *  Copyright (C) 2004 Free Software Foundation
  *
  *  This file is part of GNUTLS.
  *
@@ -289,7 +289,7 @@ int _gnutls_x509_parse_dn(ASN1_TYPE asn1_struct,
        memcpy(buf, out_str.data, out_str.length);
        buf[out_str.length] = 0;
     }
-    *sizeof_buf = out_str.length;
+    *sizeof_buf = out_str.length + 1;
 
     result = 0;