RFR(XS) 8170981: Possible access to char array with negative index

Rachel Protacio rachel.protacio at oracle.com
Mon Dec 12 16:07:03 UTC 2016


Hi,

I wonder whether it's better to declare

    const char* spaces = "         ";

and then set nSpaces as strlen(spaces), so it's clear that the spaces 
string will always be consistent with nSpaces?

Otherwise, looks good to me.
Rachel

On 12/12/2016 9:45 AM, Schmidt, Lutz wrote:
> Hi,
>
> may I please ask for reviews and sponsorship for this small fix in command
> line flag printing?
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8170981
> webrev: http://cr.openjdk.java.net/~simonis/webrevs/2016/8170981
>
> Thank you!
> Lutz
>



More information about the hotspot-runtime-dev mailing list