You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Sebb (Jira)" <ji...@apache.org> on 2020/08/10 20:29:00 UTC

[jira] [Updated] (IO-683) CircularBufferInputStream.read() fails to convert byte to unsigned int

     [ https://issues.apache.org/jira/browse/IO-683?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sebb updated IO-683:
--------------------
    Assignee: Sebb

> CircularBufferInputStream.read() fails to convert byte to unsigned int
> ----------------------------------------------------------------------
>
>                 Key: IO-683
>                 URL: https://issues.apache.org/jira/browse/IO-683
>             Project: Commons IO
>          Issue Type: Bug
>            Reporter: Sebb
>            Assignee: Sebb
>            Priority: Major
>
> The method int CircularBufferInputStream.read() returns CircularByteBuffer.read() which a byte. 
> However it does not convert it to an unsigned byte, so byte values outside the range 0-127 will be sign-extended to a negative value.
> This is wrong, and can result in premature EOF.
> Note: this bug was reported by Sonarlint.
> Spotbugs does not appear to detect the bug.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)