poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kiwiwi...@apache.org
Subject svn commit: r1735298 - /poi/trunk/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFSlideShowEncrypted.java
Date Wed, 16 Mar 2016 21:05:37 GMT
Author: kiwiwings
Date: Wed Mar 16 21:05:37 2016
New Revision: 1735298

URL: http://svn.apache.org/viewvc?rev=1735298&view=rev
Log:
Fix for Softmaker Office files, which set encryption settings invalidly

Modified:
    poi/trunk/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFSlideShowEncrypted.java

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFSlideShowEncrypted.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFSlideShowEncrypted.java?rev=1735298&r1=1735297&r2=1735298&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFSlideShowEncrypted.java
(original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFSlideShowEncrypted.java
Wed Mar 16 21:05:37 2016
@@ -85,7 +85,12 @@ public class HSLFSlideShowEncrypted {
         PersistPtrHolder ptr = (PersistPtrHolder)r;
         
         Integer encOffset = ptr.getSlideLocationsLookup().get(userEditAtomWithEncryption.getEncryptSessionPersistIdRef());
-        assert(encOffset != null);
+        if (encOffset == null) {
+            // encryption info doesn't exist anymore
+        	// SoftMaker Freeoffice produces such invalid files - check for "SMNativeObjData"
ole stream
+            dea = null;
+            return;
+        }
         
         r = recordMap.get(encOffset);
         if (r == null) {



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org


Mime
View raw message