fix ERR_add_error_vdata() for use with multiple args/calls
authorDr. David von Oheimb <David.von.Oheimb@siemens.com>
Thu, 8 Aug 2019 20:30:38 +0000 (22:30 +0200)
committerRichard Levitte <levitte@openssl.org>
Thu, 29 Aug 2019 16:14:47 +0000 (18:14 +0200)
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/9558)

crypto/err/err.c

index 24549e3..daa4e6e 100644 (file)
@@ -790,7 +790,7 @@ void ERR_add_error_vdata(int num, va_list args)
     }
     len = strlen(str);
 
-    for (len = 0; --num >= 0; ) {
+    while (--num >= 0) {
         arg = va_arg(args, char *);
         if (arg == NULL)
             arg = "<NULL>";