From: David van Moolenbroek Date: Mon, 13 Aug 2012 16:23:48 +0000 (+0000) Subject: random: resolve Coverity warnings X-Git-Tag: v3.2.1~376 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/soc.html?a=commitdiff_plain;h=533f61249b8b3686a79f479f074d61988b0dfb08;p=minix.git random: resolve Coverity warnings --- diff --git a/drivers/random/aes/rijndael_api.c b/drivers/random/aes/rijndael_api.c index 5a1a4a81c..9a564001a 100644 --- a/drivers/random/aes/rijndael_api.c +++ b/drivers/random/aes/rijndael_api.c @@ -92,7 +92,8 @@ int rijndael_makekey(rd_keyinstance *key, else break; if (keylen >= 256/8) return RD_BAD_KEY_MAT; - B(k)[keylen++] = b; + k[keylen/4][keylen%4] = b; + keylen++; } if (c != 0) return RD_BAD_KEY_MAT;