Hi, Add "const" to weak_keys array which is read only (read via bcmp()). >From what I see all other arrays in src/sys/crypto are already "static const".
- Michael Index: set_key.c =================================================================== RCS file: /cvs/src/sys/crypto/set_key.c,v retrieving revision 1.4 diff -u -p -u -r1.4 set_key.c --- set_key.c 10 Dec 2015 21:00:51 -0000 1.4 +++ set_key.c 4 Jan 2017 06:34:27 -0000 @@ -84,7 +84,7 @@ check_parity(des_cblock (*key)) * (and actual cblock values). */ #define NUM_WEAK_KEY 16 -static des_cblock weak_keys[NUM_WEAK_KEY]={ +static const des_cblock weak_keys[NUM_WEAK_KEY]={ /* weak keys */ {0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01}, {0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE},