https://bz.apache.org/bugzilla/show_bug.cgi?id=58156
Bug ID: 58156
Summary: [patch] Bug: Data corruption in hasPOIFSHeader and
hasOOXMLHeader
Product: POI
Version: 3.12-FINAL
Hardware: PC
Status: NEW
Severity: major
Priority: P2
Component: POIFS
Assignee: [email protected]
Reporter: [email protected]
If the InputStream has less than 4 (OOXML less than 8) bytes and is wrapped
into a PushbackInputStream, the data in this PushbackInputStream gets
corrupted.
Background:
Both methods try to read 4 (OOXML 8) bytes from the stream into a buffer and
then push back this buffer. But these methods always push back the entire
buffer, no matter how many bytes have actually been read from the stream. In
the case that the stream contains less than 4 (OOXML 8) bytes, the
PushbackInputStream is now extended to 4 (8) bytes with 0x00s.
This patch records the actual nember of bytes read from the stream only only
pushes back this ammount of bytes.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]