This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

StringBuffer patch


Hi,

StringBuffer.getChars() could throw an Exception because it had a bogus
check of the destination offset against the number of characters in the
StringBuffer. This was already fixed in the Classpath version. So this
patch replaces getChars() with the version in Classpath. (There are a
couple of other changes in the Classpath version that are worth
investigating, but this change fixes a real nasty bug.)

2002-12-21  Mark Wielaard  <mark@klomp.org>

    * java/lang/StringBuffer.java (getChars): Remove wrong of dstOffset
    against count.

There is now an extra test in Mauve for this case (which passes with
this patch). It also allowed me to get Eclipse running a bit more.

OK for branch and mainline?

Cheers,

Mark


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]