[jira] [Created] (VFS-356) RamFileRandomAccessContent.seek() allows seeking before file start.

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

[jira] [Created] (VFS-356) RamFileRandomAccessContent.seek() allows seeking before file start.

ASF GitHub Bot (Jira)
RamFileRandomAccessContent.seek() allows seeking before file start.
-------------------------------------------------------------------

                 Key: VFS-356
                 URL: https://issues.apache.org/jira/browse/VFS-356
             Project: Commons VFS
          Issue Type: Bug
    Affects Versions: 1.0
         Environment: None.
            Reporter: Miroslav Pokorny


MRAC simply calls RFRAC with no attempt to clip pos which results in filepoitner being set to negative values which are wrong.

MonitorRandomAccessContent {
    public void seek(long pos) throws IOException
    {
        content.seek(pos);
    }
}

RamFileRandomAccessContent
    public void seek(long pos) throws IOException {
        this.filePointer = (int) pos;
    }

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

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Resolved] (VFS-356) RamFileRandomAccessContent.seek() allows seeking before file start.

ASF GitHub Bot (Jira)

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

Ralph Goers resolved VFS-356.
-----------------------------

       Resolution: Fixed
    Fix Version/s: 2.1

seek will now verify that the position is not less than zero and will throw an IOException if it is. Please verify and close.

> RamFileRandomAccessContent.seek() allows seeking before file start.
> -------------------------------------------------------------------
>
>                 Key: VFS-356
>                 URL: https://issues.apache.org/jira/browse/VFS-356
>             Project: Commons VFS
>          Issue Type: Bug
>    Affects Versions: 1.0
>         Environment: None.
>            Reporter: Miroslav Pokorny
>             Fix For: 2.1
>
>
> MRAC simply calls RFRAC with no attempt to clip pos which results in filepoitner being set to negative values which are wrong.
> MonitorRandomAccessContent {
>     public void seek(long pos) throws IOException
>     {
>         content.seek(pos);
>     }
> }
> RamFileRandomAccessContent
>     public void seek(long pos) throws IOException {
>         this.filePointer = (int) pos;
>     }

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

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Closed] (VFS-356) RamFileRandomAccessContent.seek() allows seeking before file start.

ASF GitHub Bot (Jira)
In reply to this post by ASF GitHub Bot (Jira)

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

Miroslav Pokorny closed VFS-356.
--------------------------------


!:)
               

> RamFileRandomAccessContent.seek() allows seeking before file start.
> -------------------------------------------------------------------
>
>                 Key: VFS-356
>                 URL: https://issues.apache.org/jira/browse/VFS-356
>             Project: Commons VFS
>          Issue Type: Bug
>    Affects Versions: 1.0
>         Environment: None.
>            Reporter: Miroslav Pokorny
>             Fix For: 2.1
>
>
> MRAC simply calls RFRAC with no attempt to clip pos which results in filepoitner being set to negative values which are wrong.
> MonitorRandomAccessContent {
>     public void seek(long pos) throws IOException
>     {
>         content.seek(pos);
>     }
> }
> RamFileRandomAccessContent
>     public void seek(long pos) throws IOException {
>         this.filePointer = (int) pos;
>     }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira