提交 260c497c 编写于 作者: B Ben Laurie

Fix buffer overrun. Coverity ID 106.

上级 313fce7b
......@@ -173,7 +173,7 @@ void Camellia_cfbr_encrypt_block(const unsigned char *in,unsigned char *out,
unsigned char *ivec,const int enc)
{
int n,rem,num;
unsigned char ovec[CAMELLIA_BLOCK_SIZE*2];
unsigned char ovec[CAMELLIA_BLOCK_SIZE*2 + 1]; /* +1 because we dereference (but don't use) one byte beyond the end */
if (nbits<=0 || nbits>128) return;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册