[ http://issues.apache.org/jira/browse/SANDBOX-74?page=all ]
Henri Yandell updated SANDBOX-74:
---------------------------------
Component: Compress
> [compress] TarInputStream returns negative value for read() [PATCH]
> -------------------------------------------------------------------
>
> Key: SANDBOX-74
> URL: http://issues.apache.org/jira/browse/SANDBOX-74
> Project: Commons Sandbox
> Type: Bug
> Components: Compress
> Versions: 1.0 Alpha
> Environment: Operating System: All
> Platform: All
> Reporter: Adrian Pronk
>
> TarInputStream.read() does not convert the byte it has read to a positive
> number
> after casting it to an integer. This causes downstream processes to fail to
> recognise the value properly.
> Index: org/apache/commons/compress/tar/TarInputStream.java
> ===================================================================
> --- org/apache/commons/compress/tar/TarInputStream.java (revision
> 231420)
> +++ org/apache/commons/compress/tar/TarInputStream.java (working copy)
> @@ -306,7 +306,7 @@
> }
> else
> {
> - return (int)m_oneBuf[ 0 ];
> + return (int)m_oneBuf[ 0 ] & 0xFF;
> }
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]