]> source.dussan.org Git - poi.git/commit
Bug #60977 writing XSSF with custom properties twice corrupts output
authorGreg Woolsey <gwoolsey@apache.org>
Fri, 11 Jan 2019 18:20:03 +0000 (18:20 +0000)
committerGreg Woolsey <gwoolsey@apache.org>
Fri, 11 Jan 2019 18:20:03 +0000 (18:20 +0000)
commite211bfca6867a145a164a645343c210460a49818
tree7453af8a2b3ad74516a81fd5df2421348de5fe0e
parent4c632eb1dae7b55212992d7b55957586481cc837
Bug #60977 writing XSSF with custom properties twice corrupts output

turns out the output XML data buffer for the custom properties document was appended to, not replaced, when writing in the presence of existing content.  Now clearing output buffer first in this case.  When first creating custom properties, i.e. first write after changes, there is no buffer yet, so nothing to clear.

Does not affect any read operations, or other writes beyond custom properties, as that was where the problem lay, not down in the Zip stuff.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1851084 13f79535-47bb-0310-9956-ffa450edef68
src/ooxml/java/org/apache/poi/ooxml/POIXMLProperties.java
src/ooxml/testcases/org/apache/poi/ooxml/TestPOIXMLProperties.java