Fix crash
authorRich Salz <rsalz@openssl.org>
Thu, 15 Jun 2017 22:51:10 +0000 (18:51 -0400)
committerRich Salz <rsalz@openssl.org>
Wed, 5 Jul 2017 21:06:57 +0000 (17:06 -0400)
[extended tests]

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3700)

crypto/err/err.c

index 906e354..e50c6d6 100644 (file)
@@ -757,6 +757,8 @@ void ERR_add_error_vdata(int num, va_list args)
     n = 0;
     for (i = 0; i < num; i++) {
         a = va_arg(args, char *);
+        if (a == NULL)
+            a = "<NULL>";
         n += strlen(a);
         if (n > s) {
             s = n + 20;