浏览代码

some compilers don't like an array of length zero

nick: should we remove support for IVs for now, since we don't
use them and don't plan to use them?


svn:r1732
Roger Dingledine 20 年之前
父节点
当前提交
4e0dd5bd33
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      src/common/crypto.c

+ 2 - 1
src/common/crypto.c

@@ -74,7 +74,8 @@ struct crypto_pk_env_t
 struct crypto_cipher_env_t
 {
   unsigned char key[CIPHER_KEY_LEN];
-  unsigned char iv[CIPHER_IV_LEN];
+  unsigned char iv[CIPHER_IV_LEN+1];
+    /* +1 because some compilers don't like a length of 0 */
   aes_cnt_cipher_t *cipher;
 };