From b24b11d263d4bacb9a8df8c0b7fc3929796efe9e Mon Sep 17 00:00:00 2001 From: "nicolson%netscape.com" Date: Thu, 7 Mar 2002 01:59:58 +0000 Subject: [PATCH] Fix 129389: Algorithm.c treats oidIndex as short when it should be int. --- security/jss/org/mozilla/jss/crypto/Algorithm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/security/jss/org/mozilla/jss/crypto/Algorithm.c b/security/jss/org/mozilla/jss/crypto/Algorithm.c index 5ee754539d0f..40b70f792894 100644 --- a/security/jss/org/mozilla/jss/crypto/Algorithm.c +++ b/security/jss/org/mozilla/jss/crypto/Algorithm.c @@ -160,11 +160,11 @@ JSS_getOidTagFromAlg(JNIEnv *env, jobject alg) * The index obtained from the algorithm, or -1 if an exception was * thrown. */ -static jshort +static jint getAlgIndex(JNIEnv *env, jobject alg) { jclass algClass; - jshort index=-1; + jint index=-1; jfieldID indexField; PR_ASSERT(env!=NULL && alg!=NULL); @@ -189,7 +189,7 @@ getAlgIndex(JNIEnv *env, jobject alg) goto finish; } - index = (*env)->GetShortField(env, alg, indexField); + index = (*env)->GetIntField(env, alg, indexField); PR_ASSERT( (index >= 0) && (index < NUM_ALGS) ); finish: @@ -213,7 +213,7 @@ finish: static PRStatus getAlgInfo(JNIEnv *env, jobject alg, JSS_AlgInfo *info) { - jshort index; + jint index; PRStatus status; PR_ASSERT(env!=NULL && alg!=NULL && info!=NULL);