Uploaded image for project: 'Commons Compress'
  1. Commons Compress
  2. COMPRESS-55

CpioArchiveEntry ignores invalid modes

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.0
    • None
    • None

    Description

      CpioArchiveEntry has the following 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));
              }
      

      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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            sebb Sebb
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: