commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henri Yandell (JIRA)" <j...@apache.org>
Subject [jira] Updated: (SANDBOX-74) [compress] TarInputStream returns negative value for read() [PATCH]
Date Wed, 05 Jul 2006 03:57:35 GMT
     [ 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: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message