[jira] Created: (NET-328) FromNetASCIIInputStream.read(byte[], int, int) may change length passed to superclass if not doing conversion

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] Created: (NET-328) FromNetASCIIInputStream.read(byte[], int, int) may change length passed to superclass if not doing conversion

ASF GitHub Bot (Jira)
FromNetASCIIInputStream.read(byte[], int, int) may change length passed to superclass if not doing conversion
-------------------------------------------------------------------------------------------------------------

                 Key: NET-328
                 URL: https://issues.apache.org/jira/browse/NET-328
             Project: Commons Net
          Issue Type: Bug
    Affects Versions: 2.0
            Reporter: Sebb
            Priority: Minor


The method FromNetASCIIInputStream.read(byte[], int, int) may change the length passed to superclass if not doing conversion.

It should probably check  _noConversionRequired and call the super-class before recalculating the length.
That is
{code}
if (_noConversionRequired)
    return super.read(buffer, offset, __length);
{code}
should be done at the very start of the method.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Resolved: (NET-328) FromNetASCIIInputStream.read(byte[], int, int) may change length passed to superclass if not doing conversion

ASF GitHub Bot (Jira)

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

Sebb resolved NET-328.
----------------------

    Fix Version/s: 2.1
       Resolution: Fixed

Fixed

> FromNetASCIIInputStream.read(byte[], int, int) may change length passed to superclass if not doing conversion
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: NET-328
>                 URL: https://issues.apache.org/jira/browse/NET-328
>             Project: Commons Net
>          Issue Type: Bug
>    Affects Versions: 2.0
>            Reporter: Sebb
>            Priority: Minor
>             Fix For: 2.1
>
>
> The method FromNetASCIIInputStream.read(byte[], int, int) may change the length passed to superclass if not doing conversion.
> It should probably check  _noConversionRequired and call the super-class before recalculating the length.
> That is
> {code}
> if (_noConversionRequired)
>     return super.read(buffer, offset, __length);
> {code}
> should be done at the very start of the method.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.