[kaffe] CVS kaffe (guilhem): VMClassLoader fixlet.
Kaffe CVS
cvs-commits at kaffe.org
Sun Apr 3 11:59:53 PDT 2005
PatchSet 5654
Date: 2005/04/03 18:51:02
Author: guilhem
Branch: HEAD
Tag: (none)
Log:
VMClassLoader fixlet.
* libraries/clib/native/ClassLoader.c
(defineClass): Throw an exception if length is negative.
Reported by: Christian Thalinger <twisti at complang.tuwien.ac.at>
Members:
ChangeLog:1.3824->1.3825
libraries/clib/native/ClassLoader.c:1.44->1.45
Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.3824 kaffe/ChangeLog:1.3825
--- kaffe/ChangeLog:1.3824 Sun Apr 3 17:57:29 2005
+++ kaffe/ChangeLog Sun Apr 3 18:51:02 2005
@@ -1,8 +1,15 @@
+2005-04-03 Guilhem Lavaux <guilhem at kaffe.org>
+
+ * libraries/clib/native/ClassLoader.c
+ (defineClass): Throw an exception if length is negative.
+
+ Reported by: Christian Thalinger <twisti at complang.tuwien.ac.at>
+
2005-04-03 Dalibor Topic <robilad at kaffe.org>
* libraries/clib/nio/gnu_java_nio_VMSelector.c:
Added guards for <sys/select.h> and <sys/time.h>.
-
+
2005-04-03 Guilhem Lavaux <guilhem at kaffe.org>
* libraries/clib/nio/gnu_java_nio_VMSelector.c
Index: kaffe/libraries/clib/native/ClassLoader.c
diff -u kaffe/libraries/clib/native/ClassLoader.c:1.44 kaffe/libraries/clib/native/ClassLoader.c:1.45
--- kaffe/libraries/clib/native/ClassLoader.c:1.44 Sun Jan 9 17:26:14 2005
+++ kaffe/libraries/clib/native/ClassLoader.c Sun Apr 3 18:51:06 2005
@@ -69,9 +69,9 @@
/* This is the error sent by JDK 1.4.2 */
if (length == 0)
- {
SignalError("java.lang.ClassFormatError", "truncated class");
- }
+ if (length < 0)
+ SignalError("java.lang.ArrayIndexOutOfBoundsException", "invalid data length");
classFileInit(&hand,
NULL,
&unhand_array(data)->body[offset],
More information about the kaffe
mailing list