[prev in list] [next in list] [prev in thread] [next in thread] 

List:       jakarta-commons-dev
Subject:    [jira] Resolved: (COMPRESS-55) CpioArchiveEntry ignores invalid
From:       "Sebb (JIRA)" <jira () apache ! org>
Date:       2009-03-31 19:18:50
Message-ID: 155316946.1238527130834.JavaMail.jira () brutus
[Download RAW message or body]


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

Sebb resolved COMPRESS-55.
--------------------------

    Resolution: Fixed

Now throws an error for invalid mode

> CpioArchiveEntry ignores invalid modes
> --------------------------------------
> 
> Key: COMPRESS-55
> URL: https://issues.apache.org/jira/browse/COMPRESS-55
> Project: Commons Compress
> Issue Type: Bug
> Reporter: Sebb
> 
> CpioArchiveEntry has the following code:
> {code}
> default:
> // FIXME: testCpioUnarchive fails if I change the line to
> // actually throw the excpetion
> new IllegalArgumentException("Unknown mode (full mode: " + mode
> + ", masked mode: " + (mode & S_IFMT));
> }
> {code}
> As the comment says, rejecting invalid modes causes test failures.
> These appear to be caused by the code
> {bq}        this.cpioEntry.setMode(0);
> in the method CpioArchiveOutputStream.finish()
> Is a mode of 0 allowed? If so, then setMode needs to allow it, otherwise the method \
> call needs to change to something else.

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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic