]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
crypto/ec/curve448/eddsa.c: make dom_s constant static in hash_init_with_dom()
authorEugene Syromiatnikov <esyr@openssl.org>
Wed, 3 Jun 2026 07:34:55 +0000 (09:34 +0200)
committerTomas Mraz <tomas@openssl.foundation>
Fri, 12 Jun 2026 13:11:36 +0000 (15:11 +0200)
Otherwise it is allocated on stack and initialised on each call.

Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Bob Beck <beck@openssl.org>
Reviewed-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
MergeDate: Fri Jun 12 13:11:50 2026
(Merged from https://github.com/openssl/openssl/pull/31362)

crypto/ec/curve448/eddsa.c

index bed93c86d4bcb7178e974867235a3f4c3f236301..8615b19dfcc1603a60413571568dcd492921b3ac 100644 (file)
@@ -62,7 +62,7 @@ static c448_error_t hash_init_with_dom(OSSL_LIB_CTX *ctx, EVP_MD_CTX *hashctx,
     const char *propq)
 {
     /* ASCII: "SigEd448", in hex for EBCDIC compatibility */
-    const char dom_s[] = "\x53\x69\x67\x45\x64\x34\x34\x38";
+    static const char dom_s[] = "\x53\x69\x67\x45\x64\x34\x34\x38";
     uint8_t dom[2];
     EVP_MD *shake256 = NULL;