Brad <brad <at> comstyle.com> writes:
> > Otherwise, it looks ok portswise. I'll import it in a few days
> > unless someone still has objections.
>
> Updated tarball attached.
swfstrings crashes with J in malloc_flags on almost anything I throw at it..
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
This fixes it (sorry if diff is mangled, I don't have this thread handy any
more so replying from a web interface).
Other than this, it's OK sthen@.
$OpenBSD$
--- src/swfstrings.c.orig Sun Oct 23 21:19:57 2011
+++ src/swfstrings.c Sun Oct 23 21:19:58 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);