瀏覽代碼

Fix 17251: avoid integer overflow in test_crypto_slow

Nick Mathewson 10 年之前
父節點
當前提交
f7ce93d979
共有 2 個文件被更改,包括 4 次插入1 次删除
  1. 3 0
      changes/bug17251
  2. 1 1
      src/test/test_crypto_slow.c

+ 3 - 0
changes/bug17251

@@ -0,0 +1,3 @@
+  o Minor bugfixes (compilation):
+    - Fix an integer overflow warning in test_crypto_slow.c.
+      Fixes bug 17251; bugfix on 0.2.7.2-alpha.

+ 1 - 1
src/test/test_crypto_slow.c

@@ -217,7 +217,7 @@ test_libscrypt_eq_openssl(void *arg)
   memset(buf2,0,64);
 
   N = 1048576;
-  maxmem = 2 * 1024 * 1024 * 1024; // 2 GB
+  maxmem = 2 * 1024 * 1024 * (uint64_t)1024; // 2 GB
 
   libscrypt_retval =
   libscrypt_scrypt((const uint8_t *)"pleaseletmein",