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 24549e3a4935d028c093c8b1c41d2b9f068c324b..daa4e6e419a9bf0641900fcda02c5e8ad2571175 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>";