[Updated Patch] StringBuffer.java index checking.

Ralph Loader suckfish@ihug.co.nz
Fri Sep 26 03:47:00 GMT 2003


> This fixes 4 cases of index checking in StringBuffer, with test cases.

The patch was broken (luckily the broken patch was not committed).

Here is a new patch that fixes the breakage, and adds another check to
the testcases.

2003-09-24  Ralph Loader  <suckfish@ihug.co.nz>

        * java/lang/StringBuffer.java (getChars): Fix array index checks.
        (append, substring, insert): Likewide.
        * testsuite/libjava.lang/StringBuffer_overflow.java: New file.
        * testsuite/libjava.lang/StringBuffer_overflow.out: New file.

Ralph.

PS.  The gcc documentation at http://gcc.gnu.org/install/test.html says
that the testsuites "are part of the full distribution".  The mauve
testsuite is not included - maybe we should have a copy of mauve in gcc
cvs?



-------------- next part --------------
A non-text attachment was scrubbed...
Name: stringbuf.diff
Type: text/x-patch
Size: 5236 bytes
Desc: 
URL: <http://gcc.gnu.org/pipermail/java-patches/attachments/20030926/c6dd86e7/attachment.bin>


More information about the Java-patches mailing list