URGENT: RR(XS):8015604 JDP packets containing ideographic characters are broken

Peter Allwin peter.allwin at oracle.com
Tue Jun 4 01:20:21 PDT 2013


Agreed, we should at least check that the byte length <= 0xFFFF (which writeUTF will do for us).

Other than that it looks good!

/peter

----- Original Message -----
From: staffan.larsen at oracle.com
To: Dmitry.Samersoff at oracle.com
Cc: serviceability-dev at openjdk.java.net
Sent: Tuesday, June 4, 2013 10:03:54 AM GMT +01:00 Amsterdam / Berlin / Bern / Rome / Stockholm / Vienna
Subject: Re: URGENT: RR(XS):8015604 JDP packets containing ideographic characters are broken

Looks good. 

Even better would have been to use DataOutputStream.writeUTF().

/Staffan

On 3 jun 2013, at 23:33, Dmitry Samersoff <Dmitry.Samersoff at oracle.com> wrote:

> Hi Everybody,
> 
> The problem:
> 
> Code uses string length rather than byte array length to write length
> field of JDP packet entry. So if an entry contains non-ASCII characters
> code produces invalid packet.
> 
> 
> http://cr.openjdk.java.net/~dsamersoff/8015604/webrev.01/
> 
> -Dmitry
> 
> 
> -- 
> Dmitry Samersoff
> Oracle Java development team, Saint Petersburg, Russia
> * I would love to change the world, but they won't give me the sources.



More information about the serviceability-dev mailing list