Hi,
While porting and using swftools to OpenBSD we've run into a few bugs
with the swftools binaries.
The developer reporting this first issue mentioned crashes with pretty
much anything used with swfstrings.
Program received signal SIGBUS, Bus error.
swf_SetTagPos (t=0xd0d0d0d0d0d0d0d0, pos=0) at rfxswf.c:68
68 { swf_ResetReadBits(t);
(gdb)
(gdb) bt
#0 swf_SetTagPos (t=0xd0d0d0d0d0d0d0d0, pos=0) at rfxswf.c:68
#1 0x0000000000403352 in main (argc=2, argv=Variable "argv" is not available.
) at swfstrings.c:230
and a proposed patch by the developer.
--- src/swfstrings.c.orig Sun Oct 23 21:32:07 2011
+++ src/swfstrings.c Sun Oct 23 21:33:29 2011
@@ -208,7 +208,7 @@ int main (int argc,char ** argv)
if(!h) h = (swf.movieSize.ymax - swf.movieSize.ymin) / 20;
}
- id2tag = malloc(sizeof(TAG)*65536);
+ id2tag = calloc(65536, sizeof(TAG));
fontnum = 0;
swf_FontEnumerate(&swf,&fontcallback1, 0);
And a crash with swfc found while running the Gnash testsuite.
#0 0x0000000209ff816a in strlen () from /usr/lib/libc.so.60.1
(gdb) bt full
#0 0x0000000209ff816a in strlen () from /usr/lib/libc.so.60.1
No symbol table info available.
#1 0x000000000040a614 in readToken () at swfc.c:131
No locals.
#2 0x0000000000418663 in findFontUsage () at swfc.c:4525
fontRelated = 0x5a9889 "font;text;textshape;edittext;"
#3 0x0000000000418717 in firstPass () at swfc.c:4542
No locals.
#4 0x00000000004187da in main (argc=5, argv=0x7f7ffffdd3f8) at swfc.c:4561
t = 0
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
---------------
SWFTools-common is a self-managed list. To subscribe/unsubscribe, or amend an
existing subscription, please kindly point your favourite web browser
at:<http://lists.nongnu.org/mailman/listinfo/swftools-common>