]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Fix 17251: avoid integer overflow in test_crypto_slow
authorNick Mathewson <nickm@torproject.org>
Tue, 6 Oct 2015 12:58:03 +0000 (08:58 -0400)
committerNick Mathewson <nickm@torproject.org>
Tue, 6 Oct 2015 12:58:03 +0000 (08:58 -0400)
changes/bug17251 [new file with mode: 0644]
src/test/test_crypto_slow.c

diff --git a/changes/bug17251 b/changes/bug17251
new file mode 100644 (file)
index 0000000..edd7739
--- /dev/null
@@ -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.
index d0f50f83b9d41956d9ba9047c6d6dec25a5e4d35..853a08d8860b2806280b3be97b3d00adcaa70a27 100644 (file)
@@ -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",