Commit ecd554cd by Martin Kahlert Committed by Tom Tromey

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
parent ba3c22ff
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
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment