mirror of
https://github.com/openssh/openssh-portable.git
synced 2026-11-06 05:16:43 +00:00
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
This commit is contained in:
1 parent
33392024f4
commit
62fce76130
1 file changed
+3
-3
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user