StuartMacKay/transform-swf — Issue #3: Non-terminating Loop
Author: msandin
Created: 2011-10-10 13:28:06+00:00
State: open

Using SWF Transform 3.02 I have at least two SWF files (crawled from the web) which causes a hang in the library whilst parsing.

at com.flagstone.transform.coder.SWFDecoder.fill(SWFDecoder.java:150)
at com.flagstone.transform.coder.SWFDecoder.readBytes(SWFDecoder.java:461)
at com.flagstone.transform.action.ActionObject.(ActionObject.java:77)
at com.flagstone.transform.action.ActionDecoder.getObject(ActionDecoder.java:116)
at com.flagstone.transform.action.With.(With.java:95)
at com.flagstone.transform.action.ActionDecoder.getObject(ActionDecoder.java:107)
at com.flagstone.transform.EventHandler.(EventHandler.java:306)
at com.flagstone.transform.Place2.(Place2.java:328)
at com.flagstone.transform.MovieDecoder.getObject(MovieDecoder.java:171)
at com.flagstone.transform.Movie.decodeFromStream(Movie.java:310)
at com.apptus.documents.parsing.swf.SWFContentGenerator.movie(SWFContentGenerator.java:178)
at com.apptus.documents.parsing.swf.SWFContentGenerator.parse(SWFContentGenerator.java:63)

...(application stack culled)

Looking at the code using GrepCode I'm _guessing_ that the SWF isn't well-formed and that the inner SWFDecoder.fill(...) does not advance because the stream is empty and this condition is not detected by the outer SWFDecoder.readBytes(...), causing it to loop forever. This is however conjecture, I do not understand the code well enough.

Thanks for looking at this issue,
Martin