2009/11/23  <ma...@apache.org>:
> Author: markt
> Date: Sun Nov 22 23:14:48 2009
> New Revision: 883181
>
> URL: http://svn.apache.org/viewvc?rev=883181&view=rev
> Log:
> Proposal
>
> Modified:
>    tomcat/tc6.0.x/trunk/STATUS.txt
>
> +
> +* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48113
> +  Display IP addresses using 0-255 rather than -128 to +127
> +  Port Filip's patch from trunk
> +  http://svn.eu.apache.org/viewvc?view=revision&revision=758249
>

No positive vote? :)  Actually this fix is just wrong.

This:
+            if (asInt) buf.append((int)data[offset++]);
performs widening byte -> int, preserving the sign.

It should be
+            if (asInt) buf.append(data[offset++] & 0xff);
as in the original patch:
https://issues.apache.org/bugzilla/show_bug.cgi?id=48113#c0

Also maybe call this argument "asUnsigned"?
(The original patch calls it "unsigned", but I do not like it. It
looks like a reserved word, though it is not on the JLS list of
reserved keywords - ch.3.9 of JLS )


Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to