https://bz.apache.org/bugzilla/show_bug.cgi?id=61381

            Bug ID: 61381
           Summary: PushbackInputStreams passed to ZipHelper may not hold
                    8 bytes
           Product: POI
           Version: unspecified
          Hardware: PC
                OS: Mac OS X 10.1
            Status: NEW
          Severity: normal
          Priority: P2
         Component: OPC
          Assignee: dev@poi.apache.org
          Reporter: ket1...@gmail.com
  Target Milestone: ---

Created attachment 35200
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=35200&action=edit
Example

ZipHelper tries to be efficient when checking the header by reusing
PushbackInputStreams that are given as input, but these streams may not hold
the 8 bytes that are pushed back, and can cause an exception.

Testable example is attached.

Workaround: Wrap InputStreams in BufferedInputStream before passing them to
anything that uses ZipHelper.

Solutions:
- always create a new PushbackInputStream
- stop using PushbackInputStream and switch to mark/reset + BufferedInputStream

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org
For additional commands, e-mail: dev-h...@poi.apache.org

Reply via email to