Flagstone Software

12729. FSProtect will not decode Flash 4 files with passwords

If a Flash file is from version 4 or less and is password protected then the password will not be decoded and an FSCoderException will be thrown reporting an underflow error.

Root Cause

The root cause is an error in a previous release of the specification for the Flash file format from Macromedia which stated that the password field was added in Flash 5. However the implementation in Transform added an explicit test for the Flash file version that prevented files from being decoded when it would have be simpler and more flexible to decode any password encountered.

Workaround?

There is no workaround however changing he source code is simple. In FSProtect.java change the following lines:

Line 150: if ((coder.context[FSCoder.Version] >= 5) && 
             (password != null) && (password.length() > 0))
Line 160: if ((coder.context[FSCoder.Version] >= 5) && 
             (password != null) && (password.length() > 0))
Line 178: if ((coder.context[FSCoder.Version] >= 5) && (length > 0))    

to remove the test for the Flash file version:

Line 150: if (password != null && password.length() > 0)
Line 160: if (password != null && password.length() > 0)
Line 178: if (length > 0)

When will it be fixed?

This was fixed in Transform 2.1.6 released on 31-Dec-2007