summaryrefslogtreecommitdiffstats
path: root/openssl/src/main/java/org
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2009-10-29 23:06:37 -0700
committerElliott Hughes <enh@google.com>2009-10-30 14:21:42 -0700
commit92753052a1cd64c090089852ee3bf887cd177f49 (patch)
tree729a6809a6794b4bc1ef7faa23d59d2450d7ce0d /openssl/src/main/java/org
parent01dd9bdceadf24f0f233b91bf8ab54778f14e1b7 (diff)
downloadlibcore-92753052a1cd64c090089852ee3bf887cd177f49.zip
libcore-92753052a1cd64c090089852ee3bf887cd177f49.tar.gz
libcore-92753052a1cd64c090089852ee3bf887cd177f49.tar.bz2
Rewrite NativeBN_twosCompFitsIntoBytes.
valgrind complains about invalid 4-byte reads, caused by "case 8" in the BNInterface.c function I'm removing here, which assumed that if we're checking whether a BIGNUM fits in 8 bytes, it must require more than 4 bytes (and so accessing d[1] is acceptable). We can implement this in Java using the existing BigInteger.bitLength method (which may call down to native code, but that native code looks okay). Also remove a related commented-out method. Bugs: 2223213, 2225642
Diffstat (limited to 'openssl/src/main/java/org')
-rw-r--r--openssl/src/main/java/org/openssl/NativeBN.java3
1 files changed, 0 insertions, 3 deletions
diff --git a/openssl/src/main/java/org/openssl/NativeBN.java b/openssl/src/main/java/org/openssl/NativeBN.java
index 3597e3c..fd796f8 100644
--- a/openssl/src/main/java/org/openssl/NativeBN.java
+++ b/openssl/src/main/java/org/openssl/NativeBN.java
@@ -86,9 +86,6 @@ public class NativeBN {
public static native void BN_set_negative(int b, int n);
// void BN_set_negative(BIGNUM *b, int n);
-
- public static native boolean twosCompFitsIntoBytes(int a, int byteCnt);
-
public static native int bitLength(int a);
public static native boolean BN_is_bit_set(int a, int n);