db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <j...@apache.org>
Subject [jira] Closed: (DERBY-3941) Unsafe use of DataInput.skipBytes() in StoredPage and StoredFieldHeader
Date Fri, 17 Apr 2009 21:52:14 GMT

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

Knut Anders Hatlen closed DERBY-3941.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 10.6.0.0
       Derby Info:   (was: [Patch Available])

Committed revision 766163.
Thanks for your work on this issue, Yun!

> Unsafe use of DataInput.skipBytes() in StoredPage and StoredFieldHeader
> -----------------------------------------------------------------------
>
>                 Key: DERBY-3941
>                 URL: https://issues.apache.org/jira/browse/DERBY-3941
>             Project: Derby
>          Issue Type: Bug
>          Components: Newcomer, Store
>            Reporter: Knut Anders Hatlen
>            Assignee: Yun Lee
>            Priority: Minor
>             Fix For: 10.6.0.0
>
>         Attachments: derby-3941-1.diff, derby-3941-1.stat, derby-3941-2.diff, derby-3941-2.stat,
derby-3941-3.diff, derby-3941-3.stat, derby-3941-4.diff, derby-3941-4.stat, derby-3941-5.diff,
derby-3941-5.stat
>
>
> Some methods in StoredFileHeader and StoredPage call java.io.DataInput.skipBytes(int)
with the assumption that it always skips the requested number of bytes. According to the javadoc
for skipBytes, it may skip fewer bytes than requested, possibly 0, even if the end of the
stream hasn't been reached.
> The problem exists in these methods:
>   StoredFieldHeader.readFieldDataLength()
>   StoredPage.readRecordFromStream()
>   StoredPage.skipField()
>   StoredPage.readOneColumnFromPage()
>   StoredPage.readRecordFromArray()
> We should change the code so that it works correctly even if skipBytes() were to skip
fewer bytes than requested.

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


Mime
View raw message