mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-07 12:17:44 +08:00
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
This commit is contained in:
parent
ba3c22ff88
commit
ecd554cd35
@ -1,3 +1,9 @@
|
||||
2001-05-03 Martin Kahlert <martin.kahlert@infineon.com>
|
||||
|
||||
* jni.cc (_Jv_JNI_GetPrimitiveArrayRegion): Fixed bounds
|
||||
checking.
|
||||
(_Jv_JNI_SetPrimitiveArrayRegion): Likewise.
|
||||
|
||||
2001-04-30 Andrew Haley <aph@cambridge.redhat.com>
|
||||
|
||||
* libgcj.spec.in (jc1): Add EXCEPTIONSPEC.
|
||||
|
@ -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
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user