djcsdy / swfmill

Generate or decompile Adobe Flash SWF files using an XML dialect. Inspect and modify the XML by hand, or by using a built in XSLT processor.
http://www.swfmill.org/
GNU General Public License v2.0
131 stars 28 forks source link

swfmill segfaults on invalid input #15

Open djcsdy opened 13 years ago

djcsdy commented 13 years ago

Adrian Panasiuk reports (as bug #604104 on Launchpad):

The following xml reproducibly crashes swfmill xml2swf, version 0.3.0.

<?xml version="1.0" ?>
<swf>
        <Header framerate="25">
                <tags>
                        <DoInitAction>
                                <actions>
                                        <DeclareFunction2 argc="1"/>
                                </actions>
                        </DoInitAction>
                </tags>
        </Header>
</swf>
djcsdy commented 13 years ago

This fails because <DoInitAction> requires a sprite attribute. Unfortunately swfmill’s error reporting ranges from terrible to non-existent, so it crashes instead of informing you of the problem.