소스 검색

Fix buffer size in sha512 unit test

Nobody likes a stack overflow, even in unit tests.

Closes 17699; but not in any released tor.
Nick Mathewson 8 년 전
부모
커밋
0285054189
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/test/test_crypto.c

+ 1 - 1
src/test/test_crypto.c

@@ -287,7 +287,7 @@ test_crypto_sha(void *arg)
   char key[160];
   char digest[32];
   char data[50];
-  char d_out1[DIGEST_LEN], d_out2[DIGEST256_LEN];
+  char d_out1[DIGEST_LEN], d_out2[DIGEST512_LEN];
   char *mem_op_hex_tmp=NULL;
 
   /* Test SHA-1 with a test vector from the specification. */