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
2 changed files with 8 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue