You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by Gerhard Froehlich <g-...@gmx.de> on 2001/11/04 12:36:23 UTC

[AvalonDB] AvalonDBDriver little patch

Hi,
this little patch contains a JDBC Url
length checking, to avoid those ArrayOutOfBoundsExceptions :).

<<<<patch>>>>>
Index: AvalonDBDriver.java
===================================================================
RCS file:
/home/cvspublic/jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/driver/AvalonDBDriv
er.java,v
retrieving revision 1.8
diff -u -r1.8 AvalonDBDriver.java
--- AvalonDBDriver.java	2001/11/04 10:22:13	1.8
+++ AvalonDBDriver.java	2001/11/04 11:23:09
@@ -67,6 +67,9 @@
         //  0       1         2          3         4       5      6

         String[] words = StringUtils.split(url,":");
+        if(words.length < 7) {
+            throw new SQLException("Invalid JDBC URL");
+        }

         String driver = null;
         if (words[2].equals("cmds")) {


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>