From: Mark Wooding Date: Fri, 5 Jan 2018 04:27:14 +0000 (+0000) Subject: symm/rijndael-mktab.c: Don't hardwire output `rcon' table size. X-Git-Tag: 2.4.2~3 X-Git-Url: https://git.distorted.org.uk/~mdw/catacomb/commitdiff_plain/67c3ec710ed0938ea77537deaf9e080873f24248 symm/rijndael-mktab.c: Don't hardwire output `rcon' table size. We output `sizeof(rc)' entries, so that's what we should put in the array length. --- diff --git a/symm/rijndael-mktab.c b/symm/rijndael-mktab.c index 91007cc7..182ae327 100644 --- a/symm/rijndael-mktab.c +++ b/symm/rijndael-mktab.c @@ -331,11 +331,11 @@ const uint32 rijndael_u[4][256] = {\n\ /* --- Round constants --- */ rcon(); - fputs("\ + printf("\ /* --- The round constants --- */\n\ \n\ -const octet rijndael_rcon[32] = {\n\ - ", stdout); +const octet rijndael_rcon[%u] = {\n\ + ", (unsigned)sizeof(rc)); for (i = 0; i < sizeof(rc); i++) { printf("0x%02x", rc[i]); if (i == sizeof(rc) - 1)