commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (JIRA)" <j...@apache.org>
Subject [jira] [Created] (COMPRESS-130) ZipArchiveInputStream.skip could use safer comparison; inherited Javadoc is incorrect
Date Thu, 12 May 2011 14:45:49 GMT
ZipArchiveInputStream.skip could use safer comparison; inherited Javadoc is incorrect
-------------------------------------------------------------------------------------

                 Key: COMPRESS-130
                 URL: https://issues.apache.org/jira/browse/COMPRESS-130
             Project: Commons Compress
          Issue Type: Bug
            Reporter: Sebb
            Priority: Minor


ZipArchiveInputStream.skip uses the condition (skipped != value) to detect when it has skipped
enough. 
It would be safer to use (skipped < value) in case skipped somehow exceeds value.

Also, the inherited Javadoc says that skip(value) may skip fewer than value bytes - AFAICT
this is precisely the potential error that this method was written to solve.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message