]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
Remove preprocessor directive from log macro calls.
authorDarren Tucker <dtucker@dtucker.net>
Sun, 8 Nov 2020 13:33:35 +0000 (00:33 +1100)
committerDarren Tucker <dtucker@dtucker.net>
Sun, 8 Nov 2020 13:33:35 +0000 (00:33 +1100)
Preprocessor directives inside macro calls, such as the new log macros,
are undefined behaviour and do not work with, eg old GCCs.  Put the
entire log call inside the ifdef for OPENSSL_HAS_NISTP521.

ssh-keygen.c

index 303faee31e1d37360fb0cb82b902199cafc0c67d..23d273a969316d8ee18ae83650725d8b67e1e7b4 100644 (file)
@@ -219,10 +219,11 @@ type_bits_valid(int type, const char *name, u_int32_t *bitsp)
                break;
        case KEY_ECDSA:
                if (sshkey_ecdsa_bits_to_nid(*bitsp) == -1)
-                       fatal("Invalid ECDSA key length: valid lengths are "
 #ifdef OPENSSL_HAS_NISTP521
+                       fatal("Invalid ECDSA key length: valid lengths are "
                            "256, 384 or 521 bits");
 #else
+                       fatal("Invalid ECDSA key length: valid lengths are "
                            "256 or 384 bits");
 #endif
        }