aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony Green <green@gcc.gnu.org>1999-08-09 00:25:51 +0000
committerAnthony Green <green@gcc.gnu.org>1999-08-09 00:25:51 +0000
commite3253af52066d10939765b186fb5505502e1a949 (patch)
tree2e14f76a234c1ea9df27dca0451f7c7904c8fc2a
parent63ecaef554f610b329935aeb02cc71855f1fdefa (diff)
downloadgcc-e3253af52066d10939765b186fb5505502e1a949.zip
gcc-e3253af52066d10939765b186fb5505502e1a949.tar.gz
gcc-e3253af52066d10939765b186fb5505502e1a949.tar.bz2
defineclass.cc (_Jv_VerifyClassName): Verify array names correctly.
* defineclass.cc (_Jv_VerifyClassName): Verify array names correctly. From-SVN: r28606
-rw-r--r--libjava/ChangeLog9
-rw-r--r--libjava/defineclass.cc8
2 files changed, 15 insertions, 2 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog
index 24051fc..28512d3 100644
--- a/libjava/ChangeLog
+++ b/libjava/ChangeLog
@@ -1,4 +1,9 @@
-1999-08-09 Anthony Green <green@cygnus.com>
+1999-08-08 Anthony Green <green@cygnus.com>
+
+ * defineclass.cc (_Jv_VerifyClassName): Verify array names
+ correctly.
+
+1999-08-08 Anthony Green <green@cygnus.com>
* gij.cc: New file.
@@ -30,7 +35,7 @@
* NEWS: More news.
* THANKS: More thanks.
-1999-08-09 Kresten Krab Thorup <krab@gnu.org>
+1999-08-08 Kresten Krab Thorup <krab@gnu.org>
* resolve.cc (get_ffi_type_from_signature): Generate uint16 for
jchar type.
diff --git a/libjava/defineclass.cc b/libjava/defineclass.cc
index 09f8f47..e062fb2 100644
--- a/libjava/defineclass.cc
+++ b/libjava/defineclass.cc
@@ -1414,6 +1414,14 @@ _Jv_VerifyClassName (unsigned char* ptr, _Jv_ushort length)
unsigned char *limit = ptr+length;
int ch;
+ if ('[' == UTF8_PEEK (ptr, limit))
+ {
+ if (! _Jv_VerifyOne (++ptr, limit, false))
+ throw_class_format_error ("erroneous class name");
+ else
+ return;
+ }
+
next_level:
do {
if ((ch = UTF8_GET (ptr, limit))==-1)