swftools-common
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Swftools-common] Small bug in swfdump for function definition actions


From: Marcus Doemling
Subject: [Swftools-common] Small bug in swfdump for function definition actions
Date: Fri, 22 Oct 2004 11:04:04 -0400

Hi Matthias.

I found a small bug in swfdump with respect to outputting function
definitions.
An example:

....
                 (   11 bytes) action: DefineFunction xx(xx, xx) codesize:30
                                       {
                 (    2 bytes) action:     Push Lookup:0 ("this")
                 (    0 bytes) action:     GetVariable
....

Note the outputting of the function definition as xx(xx, xx) showing the
function name
instead of the proper parameter names. The bug has an easy fix, the patch is
here:

*** lib/modules/swfaction.c.orig        Fri Oct 22 10:35:19 2004
--- lib/modules/swfaction.c     Fri Oct 22 10:52:46 2004
***************
*** 375,381 ****
                      num = (data[s++]); //num
                      num += (data[s++])*256;
                      for(t=0;t<num;t++) {
!                         printf("%s",data);
                          if(t<num-1)
                              printf(", ");
                          while(data[s++]); //param
--- 375,381 ----
                      num = (data[s++]); //num
                      num += (data[s++])*256;
                      for(t=0;t<num;t++) {
!                         printf("%s",data+s);  // 10/22/04 MD: added +s to
point to parameter name
                          if(t<num-1)
                              printf(", ");
                          while(data[s++]); //param

---------------

Marcus





reply via email to

[Prev in Thread] Current Thread [Next in Thread]