diff options
author | Martin Kahlert <martin.kahlert@infineon.com> | 2001-05-03 16:56:38 +0000 |
---|---|---|
committer | Tom Tromey <tromey@gcc.gnu.org> | 2001-05-03 16:56:38 +0000 |
commit | ecd554cd35980ee431644a7036c7cc4fa2c45077 (patch) | |
tree | 9edb4548e1ab6b32fe7107a5e48063d109ba7d3f /libjava/jni.cc | |
parent | ba3c22ff8874c47c7b6a159c9fe54933a4fe90f9 (diff) | |
download | gcc-ecd554cd35980ee431644a7036c7cc4fa2c45077.tar.gz |
jni.cc (_Jv_JNI_GetPrimitiveArrayRegion): Fixed bounds checking.
2001-05-03 Martin Kahlert <martin.kahlert@infineon.com>
* jni.cc (_Jv_JNI_GetPrimitiveArrayRegion): Fixed bounds
checking.
(_Jv_JNI_SetPrimitiveArrayRegion): Likewise.
From-SVN: r41795
Diffstat (limited to 'libjava/jni.cc')
-rw-r--r-- | libjava/jni.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libjava/jni.cc b/libjava/jni.cc index 34f2995a408..3f5703a18e0 100644 --- a/libjava/jni.cc +++ b/libjava/jni.cc @@ -1366,7 +1366,7 @@ _Jv_JNI_GetPrimitiveArrayRegion (JNIEnv *env, JArray<T> *array, { // The cast to unsigned lets us save a comparison. if (start < 0 || len < 0 - || (unsigned long) (start + len) >= (unsigned long) array->length) + || (unsigned long) (start + len) > (unsigned long) array->length) { try { @@ -1393,7 +1393,7 @@ _Jv_JNI_SetPrimitiveArrayRegion (JNIEnv *env, JArray<T> *array, { // The cast to unsigned lets us save a comparison. if (start < 0 || len < 0 - || (unsigned long) (start + len) >= (unsigned long) array->length) + || (unsigned long) (start + len) > (unsigned long) array->length) { try { |