[openssl-commits] [openssl] OpenSSL_1_1_0-stable update

Richard Levitte levitte at openssl.org
Thu Feb 23 01:20:25 UTC 2017


The branch OpenSSL_1_1_0-stable has been updated
       via  9f1dd6a6ff6dadb3b356f74357a85cc3b5002e6d (commit)
      from  ce180867a4ae781cd84fdcf01ba6e2320de651ef (commit)


- Log -----------------------------------------------------------------
commit 9f1dd6a6ff6dadb3b356f74357a85cc3b5002e6d
Author: Richard Levitte <levitte at openssl.org>
Date:   Thu Feb 23 01:45:04 2017 +0100

    On VMS, massage the fetch file names to remove the generation number
    
    The generation number is ';nnn' at the end of the file name fetched
    with readdir().  Because rehash checks for specific extensions and
    doesn't expect an additional generation number, the easiest is to
    massage the received file name early by simply removing the generation
    number.
    
    Reviewed-by: Rich Salz <rsalz at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/2717)
    (cherry picked from commit 39aceac320a1561d50c7d71ac2560aec7ab8eddb)

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

Summary of changes:
 apps/rehash.c | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/apps/rehash.c b/apps/rehash.c
index 6544ae1..a380bdd 100644
--- a/apps/rehash.c
+++ b/apps/rehash.c
@@ -281,6 +281,24 @@ static int ends_with_dirsep(const char *path)
     return *path == '/';
 }
 
+static int massage_filename(char *name)
+{
+# ifdef __VMS
+    char *p = strchr(name, ';');
+    char *q = p;
+
+    if (q != NULL) {
+        for (q++; *q != '\0'; q++) {
+            if (!isdigit(*q))
+                return 1;
+        }
+    }
+
+    *p = '\0';
+# endif
+    return 1;
+}
+
 /*
  * Process a directory; return number of errors found.
  */
@@ -316,6 +334,7 @@ static int do_dir(const char *dirname, enum Hash h)
     }
     while ((filename = OPENSSL_DIR_read(&d, dirname)) != NULL) {
         if ((copy = strdup(filename)) == NULL
+                || !massage_filename(copy)
                 || sk_OPENSSL_STRING_push(files, copy) == 0) {
             BIO_puts(bio_err, "out of memory\n");
             exit(1);


More information about the openssl-commits mailing list