Browse code

Fixed static defined length check to use sizeof()

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>

Emilien Mantel authored on 2010/06/26 20:56:48
Showing 1 changed files
... ...
@@ -779,7 +779,7 @@ verify_callback (int preverify_ok, X509_STORE_CTX * ctx)
779 779
   string_replace_leading (subject, '-', '_');
780 780
 
781 781
   /* extract the username (default is CN) */
782
-  if (!extract_x509_field_ssl (X509_get_subject_name (ctx->current_cert), x509_username_field, common_name, TLS_USERNAME_LEN))
782
+  if (!extract_x509_field_ssl (X509_get_subject_name (ctx->current_cert), x509_username_field, common_name, sizeof(common_name)))
783 783
     {
784 784
       if (!ctx->error_depth)
785 785
         {