]> tinc-vpn.org Git - tinc/commitdiff
Avoid compiler warnings from arrays initialized by strings
authorGuus Sliepen <guus@tinc-vpn.org>
Sun, 9 Nov 2025 16:05:11 +0000 (17:05 +0100)
committerGuus Sliepen <guus@tinc-vpn.org>
Sun, 9 Nov 2025 16:05:11 +0000 (17:05 +0100)
src/chacha-poly1305/chacha.c

index 696f44a521820d09b7f55a3e487719a10468cfcb..54d3708569ac6abea74dac987874079253c37411 100644 (file)
@@ -44,8 +44,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 sigma[16] = "expand 32-byte k";
-static const char tau[16] = "expand 16-byte k";
+static const char sigma[17] = "expand 32-byte k";
+static const char tau[17] = "expand 16-byte k";
 
 void chacha_keysetup(chacha_ctx *x, const uint8_t *k, uint32_t kbits) {
        const char *constants;