]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Fixed static defined length check to use sizeof()
authorEmilien Mantel <emilien.mantel@businessdecision.com>
Sat, 26 Jun 2010 11:56:48 +0000 (13:56 +0200)
committerDavid Sommerseth <dazo@users.sourceforge.net>
Thu, 21 Oct 2010 19:26:59 +0000 (21:26 +0200)
This comes in addition to commit 935c62be9c0c8a256112d after some
additional review comments.

Signed-off-by: Emilien Mantel <emilien.mantel@businessdecision.com>
Acked-by: Peter Stuge <peter@stuge.se>
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
ssl.c

diff --git a/ssl.c b/ssl.c
index e6285040fb9f20ed7ba809c6aacbf247c42241ae..ed2f69dc315c0dd8d1970ebd0de4979e10b1244b 100644 (file)
--- a/ssl.c
+++ b/ssl.c
@@ -779,7 +779,7 @@ verify_callback (int preverify_ok, X509_STORE_CTX * ctx)
   string_replace_leading (subject, '-', '_');
 
   /* extract the username (default is CN) */
-  if (!extract_x509_field_ssl (X509_get_subject_name (ctx->current_cert), x509_username_field, common_name, TLS_USERNAME_LEN))
+  if (!extract_x509_field_ssl (X509_get_subject_name (ctx->current_cert), x509_username_field, common_name, sizeof(common_name)))
     {
       if (!ctx->error_depth)
         {