tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantin Kolinko <knst.koli...@gmail.com>
Subject Re: svn commit: r883181 - /tomcat/tc6.0.x/trunk/STATUS.txt
Date Mon, 23 Nov 2009 05:27:58 GMT
2009/11/23  <markt@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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message