[openssh-commits] [openssh] 02/04: upstream: chacha: avoid -Wunterminated-string-initialization

git+noreply at mindrot.org git+noreply at mindrot.org
Thu May 21 14:06:49 AEST 2026


This is an automated email from the git hooks/post-receive script.

djm pushed a commit to branch master
in repository openssh.

commit 62fce76130485773c635da8adaeb7de78382a5f0
Author: tb at openbsd.org <tb at openbsd.org>
AuthorDate: Mon May 18 04:14:57 2026 +0000

    upstream: chacha: avoid -Wunterminated-string-initialization
    
    warning
    
    The sizes of sigma[] and tau[] aren't used, so include a trailing NUL and
    thereby avoid upsetting modern compilers about use of dangerous, valid C.
    
    ok deraadt djm
    
    OpenBSD-Commit-ID: 030a71ff16bb1e6135170c6507bc558eabe7345c
---
 chacha.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/chacha.c b/chacha.c
index 9d79b661c..de79b3729 100644
--- a/chacha.c
+++ b/chacha.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: chacha.c,v 1.2 2023/07/17 05:26:38 djm Exp $ */
+/* $OpenBSD: chacha.c,v 1.3 2026/05/18 04:14:57 tb Exp $ */
 /*
 chacha-merged.c version 20080118
 D. J. Bernstein
@@ -48,8 +48,8 @@ typedef struct chacha_ctx chacha_ctx;
   a = PLUS(a,b); d = ROTATE(XOR(d,a), 8); \
   c = PLUS(c,d); b = ROTATE(XOR(b,c), 7);
 
-static const char __attribute__ ((__nonstring__)) sigma[16] = "expand 32-byte k";
-static const char __attribute__ ((__nonstring__)) tau[16] = "expand 16-byte k";
+static const char sigma[] = "expand 32-byte k";
+static const char tau[] = "expand 16-byte k";
 
 void
 chacha_keysetup(chacha_ctx *x,const u8 *k,u32 kbits)

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list