APPS: fix load_certs_multifile() interpreting backslashes
authorDr. David von Oheimb <David.von.Oheimb@siemens.com>
Sun, 21 Mar 2021 22:23:23 +0000 (23:23 +0100)
committerDr. David von Oheimb <dev@ddvo.net>
Mon, 22 Mar 2021 06:54:03 +0000 (07:54 +0100)
Fixes #14622

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/14636)

apps/lib/apps.c

index 61b3ebc6dec7fbf07ffedeb1f905dd2e77763346..69a98ecf37caf9c62bfc75c69012260e7b188e4d 100644 (file)
@@ -641,12 +641,8 @@ void* app_malloc(int sz, const char *what)
 char *next_item(char *opt) /* in list separated by comma and/or space */
 {
     /* advance to separator (comma or whitespace), if any */
-    while (*opt != ',' && !isspace(*opt) && *opt != '\0') {
-        if (*opt == '\\' && opt[1] != '\0')
-            /* skip and unescape '\' escaped char */
-            memmove(opt, opt + 1, strlen(opt));
+    while (*opt != ',' && !isspace(*opt) && *opt != '\0')
         opt++;
-    }
     if (*opt != '\0') {
         /* terminate current item */
         *opt++ = '\0';