Vulnerability Development mailing list archives
Re: Java and buffer overflows
From: ash <ashcrow () phreaker net>
Date: 26 Jun 2002 14:05:49 -0400
What happened here is that the JavaVM caught an exception while parsing the code. It won't cause any problems AFAIK but it will keep a program from working ;-). Generally speaking you use try {} catch () {} to deal with raised exceptions in Java so that if an error does happen it is delt with properly or errors out in such a manor that the user can understand why. Cheers, Ash ---- Darkfire Secure Linux -- http://www.gnulinux.net On Mon, 2002-06-24 at 23:40, KF wrote:
Not sure if this helps .... I was trying to come up with a scenario that passed user input to a buffer but the compiler kept barking at me so this is the best I can do. [root@qa5 root]# cat test.java class test { public static void main(String args[]) { String[] test = new String[4]; test[0] = "A"; test[1] = "A"; test[2] = "A"; test[3] = "A"; test[4] = "A"; test[5] = "A"; test[6] = "A"; } } [root@rcmqa5 root]# javac test.java [root@rcmqa5 root]# java test Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 4 at test.main(test.java:11) -KF
Current thread:
- Java and buffer overflows cyber_rider (Jun 23)
- Re: Java and buffer overflows Felix Harris (Jun 25)
- Re: Java and buffer overflows KF (Jun 26)
- Re: Java and buffer overflows Javier Blanque (Jun 26)
- Re: Java and buffer overflows ash (Jun 26)
- Re: Java and buffer overflows Anibal Ambertin (Jun 27)
- Re: Java and buffer overflows KF (Jun 26)
- Re: Java and buffer overflows Rafael Anschau (Jun 25)
- Re: Java and buffer overflows Branko Ivanovic (Jun 26)
- Re: Java and buffer overflows Nelson Sampaio Araujo Junior (Jun 26)
- Re: Java and buffer overflows Rafael Anschau (Jun 26)
- Re: Java and buffer overflows Dave Aitel (Jun 26)
- Re: Java and buffer overflows KF (Jun 27)
- Re: Java and buffer overflows Dave Aitel (Jun 27)
- RE: Java and buffer overflows Zacharias Pigadas (Jun 28)
- JNI and buffer overflows (was java and buffer overflows) KF (Jun 28)
- Re: Java and buffer overflows Felix Harris (Jun 25)