2003-07-23 Tom Tromey <tromey@redhat.com>
+ * java/lang/natSystem.cc (arraycopy): Check for overflow.
+
* boehm.cc (_Jv_BuildGCDescr): Use `1ULL'.
2003-07-22 Tom Tromey <tromey@redhat.com>
__JArray *src_a = (__JArray *) src;
__JArray *dst_a = (__JArray *) dst;
if (src_offset < 0 || dst_offset < 0 || count < 0
- || src_offset + count > src_a->length
- || dst_offset + count > dst_a->length)
+ || (unsigned jint) src_offset > (unsigned jint) src_a->length
+ || (unsigned jint) (src_offset + count) > (unsigned jint) src_a->length
+ || (unsigned jint) dst_offset > (unsigned jint) dst_a->length
+ || (unsigned jint) (dst_offset + count) > (unsigned jint) dst_a->length)
throw new ArrayIndexOutOfBoundsException;
// Do-nothing cases.