You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "Henri Yandell (JIRA)" <ji...@apache.org> on 2006/12/06 01:01:26 UTC
[jira] Created: (IO-102) Potential unread bytes in
readSwappedLong(InputStream)
Potential unread bytes in readSwappedLong(InputStream)
------------------------------------------------------
Key: IO-102
URL: http://issues.apache.org/jira/browse/IO-102
Project: Commons IO
Issue Type: Bug
Reporter: Henri Yandell
Priority: Minor
Fix For: 1.3
Attachments: IO-102.patch
In:
byte[] bytes = new byte[8];
input.read( bytes );
return readSwappedLong( bytes, 0 );
There is no check on the int return value from input.read, so it's possible that 8 bytes won't be read.
--
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
[jira] Updated: (IO-102) Potential unread bytes in
readSwappedLong(InputStream)
Posted by "Henri Yandell (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/IO-102?page=all ]
Henri Yandell updated IO-102:
-----------------------------
Component/s: Utilities
> Potential unread bytes in readSwappedLong(InputStream)
> ------------------------------------------------------
>
> Key: IO-102
> URL: http://issues.apache.org/jira/browse/IO-102
> Project: Commons IO
> Issue Type: Bug
> Components: Utilities
> Reporter: Henri Yandell
> Priority: Minor
> Fix For: 1.3
>
> Attachments: IO-102.patch
>
>
> In:
> byte[] bytes = new byte[8];
> input.read( bytes );
> return readSwappedLong( bytes, 0 );
> There is no check on the int return value from input.read, so it's possible that 8 bytes won't be read.
--
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
[jira] Updated: (IO-102) Potential unread bytes in
readSwappedLong(InputStream)
Posted by "Henri Yandell (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/IO-102?page=all ]
Henri Yandell updated IO-102:
-----------------------------
Attachment: IO-102.patch
Patch to fix this.
> Potential unread bytes in readSwappedLong(InputStream)
> ------------------------------------------------------
>
> Key: IO-102
> URL: http://issues.apache.org/jira/browse/IO-102
> Project: Commons IO
> Issue Type: Bug
> Reporter: Henri Yandell
> Priority: Minor
> Fix For: 1.3
>
> Attachments: IO-102.patch
>
>
> In:
> byte[] bytes = new byte[8];
> input.read( bytes );
> return readSwappedLong( bytes, 0 );
> There is no check on the int return value from input.read, so it's possible that 8 bytes won't be read.
--
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
[jira] Updated: (IO-102) Potential unread bytes in
readSwappedLong(InputStream)
Posted by "Henri Yandell (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/IO-102?page=all ]
Henri Yandell updated IO-102:
-----------------------------
Attachment: IO-102.patch
Patch to fix this issue.
> Potential unread bytes in readSwappedLong(InputStream)
> ------------------------------------------------------
>
> Key: IO-102
> URL: http://issues.apache.org/jira/browse/IO-102
> Project: Commons IO
> Issue Type: Bug
> Components: Utilities
> Reporter: Henri Yandell
> Priority: Minor
> Fix For: 1.3
>
> Attachments: IO-102.patch
>
>
> In:
> byte[] bytes = new byte[8];
> input.read( bytes );
> return readSwappedLong( bytes, 0 );
> There is no check on the int return value from input.read, so it's possible that 8 bytes won't be read.
--
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
[jira] Updated: (IO-102) Potential unread bytes in
readSwappedLong(InputStream)
Posted by "Henri Yandell (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/IO-102?page=all ]
Henri Yandell updated IO-102:
-----------------------------
Attachment: (was: IO-102.patch)
> Potential unread bytes in readSwappedLong(InputStream)
> ------------------------------------------------------
>
> Key: IO-102
> URL: http://issues.apache.org/jira/browse/IO-102
> Project: Commons IO
> Issue Type: Bug
> Components: Utilities
> Reporter: Henri Yandell
> Priority: Minor
> Fix For: 1.3
>
> Attachments: IO-102.patch
>
>
> In:
> byte[] bytes = new byte[8];
> input.read( bytes );
> return readSwappedLong( bytes, 0 );
> There is no check on the int return value from input.read, so it's possible that 8 bytes won't be read.
--
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
[jira] Resolved: (IO-102) Potential unread bytes in
readSwappedLong(InputStream)
Posted by "Henri Yandell (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/IO-102?page=all ]
Henri Yandell resolved IO-102.
------------------------------
Resolution: Fixed
svn ci -m "Applying my patch from #IO-102 - fixes readSwappedLong(InputStream) for the possibility that not all 8 bytes would be read by input.read(bytes)"
Sending src/java/org/apache/commons/io/EndianUtils.java
Transmitting file data .
Committed revision 482840.
> Potential unread bytes in readSwappedLong(InputStream)
> ------------------------------------------------------
>
> Key: IO-102
> URL: http://issues.apache.org/jira/browse/IO-102
> Project: Commons IO
> Issue Type: Bug
> Components: Utilities
> Reporter: Henri Yandell
> Priority: Minor
> Fix For: 1.3
>
> Attachments: IO-102.patch
>
>
> In:
> byte[] bytes = new byte[8];
> input.read( bytes );
> return readSwappedLong( bytes, 0 );
> There is no check on the int return value from input.read, so it's possible that 8 bytes won't be read.
--
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