tika-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Doug Martin (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (TIKA-1176) ChmDirectoryListingSet does not correctly enumerate directory entries
Date Tue, 01 Oct 2013 18:36:24 GMT

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

Doug Martin updated TIKA-1176:
------------------------------

    Description: 
ChmDirectoryListingSet.enumerateOneSegment method does not correctly enumerate directory entries
when ChmCommons.indexOf returns -1 for work data or user data.  Here is the offending code:
{code}
                int indexWorkData = ChmCommons.indexOf(dir_chunk,
                        "::".getBytes());
                int indexUserData = ChmCommons.indexOf(dir_chunk,
                        "/".getBytes());

                if (indexUserData < indexWorkData)
                    setPlaceHolder(indexUserData);
                else
                    setPlaceHolder(indexWorkData);

                if (getPlaceHolder() > 0 ...
{code}

If either indexUserData or indexWorkData is -1, that value will be set as the placeholder
index, resulting in the method returning without processing any entries.


  was:
ChmDirectoryListingSet.enumerateOneSegment method does not correctly enumerate directory entries
when ChmCommons.indexOf returns -1 for work data or user data.  Here is the offending code:
{code}
                int indexWorkData = ChmCommons.indexOf(dir_chunk,
                        "::".getBytes());
                int indexUserData = ChmCommons.indexOf(dir_chunk,
                        "/".getBytes());

                if (indexUserData < indexWorkData)
                    setPlaceHolder(indexUserData);
                else
                    setPlaceHolder(indexWorkData);

                if (getPlaceHolder() > 0 ...
{code}

If either indexUserData or IndexWorkData is -1, that value will be set as the placeholder
index, resulting in the method returning without processing any entries.



> ChmDirectoryListingSet does not correctly enumerate directory entries
> ---------------------------------------------------------------------
>
>                 Key: TIKA-1176
>                 URL: https://issues.apache.org/jira/browse/TIKA-1176
>             Project: Tika
>          Issue Type: Bug
>          Components: parser
>    Affects Versions: 1.4
>            Reporter: Doug Martin
>
> ChmDirectoryListingSet.enumerateOneSegment method does not correctly enumerate directory
entries when ChmCommons.indexOf returns -1 for work data or user data.  Here is the offending
code:
> {code}
>                 int indexWorkData = ChmCommons.indexOf(dir_chunk,
>                         "::".getBytes());
>                 int indexUserData = ChmCommons.indexOf(dir_chunk,
>                         "/".getBytes());
>                 if (indexUserData < indexWorkData)
>                     setPlaceHolder(indexUserData);
>                 else
>                     setPlaceHolder(indexWorkData);
>                 if (getPlaceHolder() > 0 ...
> {code}
> If either indexUserData or indexWorkData is -1, that value will be set as the placeholder
index, resulting in the method returning without processing any entries.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message