[openssl] openssl-3.0 update

tomas at openssl.org tomas at openssl.org
Fri Sep 17 11:15:01 UTC 2021


The branch openssl-3.0 has been updated
       via  d656a086ef61581cae10a0f33322e6910232aa01 (commit)
      from  3f9c95824593b8d57ac0227591e4c338fc98c5f9 (commit)


- Log -----------------------------------------------------------------
commit d656a086ef61581cae10a0f33322e6910232aa01
Author: Dr. David von Oheimb <David.von.Oheimb at siemens.com>
Date:   Sat Sep 11 23:08:13 2021 +0200

    APPS/cmp.c: Move warning on overlong section name to make it effective again
    
    Fixes #16585
    
    Reviewed-by: Paul Dale <pauli at openssl.org>
    Reviewed-by: Tomas Mraz <tomas at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/16586)
    
    (cherry picked from commit 39a8d4e13219580c8c89a234d6db5d261408cadb)

-----------------------------------------------------------------------

Summary of changes:
 apps/cmp.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/apps/cmp.c b/apps/cmp.c
index 74c8cd71f1..170ac816f2 100644
--- a/apps/cmp.c
+++ b/apps/cmp.c
@@ -2001,14 +2001,14 @@ static const char *prev_item(const char *opt, const char *end)
     while (beg != opt && beg[-1] != ',' && !isspace(beg[-1]))
         beg--;
     len = end - beg;
-    if (len > SECTION_NAME_MAX)
+    if (len > SECTION_NAME_MAX) {
+        CMP_warn2("using only first %d characters of section name starting with \"%s\"",
+                  SECTION_NAME_MAX, opt_item);
         len = SECTION_NAME_MAX;
+    }
     strncpy(opt_item, beg, len);
     opt_item[SECTION_NAME_MAX] = '\0'; /* avoid gcc v8 O3 stringop-truncation */
     opt_item[len] = '\0';
-    if (len > SECTION_NAME_MAX)
-        CMP_warn2("using only first %d characters of section name starting with \"%s\"",
-                  SECTION_NAME_MAX, opt_item);
     while (beg != opt && (beg[-1] == ',' || isspace(beg[-1])))
         beg--;
     return beg;


More information about the openssl-commits mailing list