swftools-common
[Top][All Lists]
Advanced

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

Re: [Swftools-common] Access Violation in swf_GetU8


From: Romi Kuntsman
Subject: Re: [Swftools-common] Access Violation in swf_GetU8
Date: Sun, 2 Sep 2012 12:51:08 +0300

It also appears in a few other places in the code:

swftools-2012-04-08-0857\lib\as3\expr.c (1 hits)
Line 2608:             *(int*)0=0;
swftools-2012-04-08-0857\lib\mem.c (4 hits)
Line 18:     //*(int*)0=0;
Line 25:     //*(int*)0 = 0xdead;
Line 42:     //*(int*)0 = 0xdead;
Line 64:     //*(int*)0 = 0xdead;
swftools-2012-04-08-0857\lib\rfxswf.c (1 hits)
Line 97:       *(int*)0=0;

On Sun, Sep 2, 2012 at 12:47 PM, Romi Kuntsman <address@hidden> wrote:
Hi,
This code CRASHES the program:
*(int*)0=0;

U8 swf_GetU8(TAG * t)
{ swf_ResetReadBits(t);
  #ifdef DEBUG_RFXSWF
    if ((int)t->pos>=(int)t->len) 
    { fprintf(stderr,"GetU8() out of bounds: TagID = %i\n",t->id);
      *(int*)0=0;
      return 0;
    }
  #endif
  return t->data[t->pos++];
}

It does not appear in swf_GetU16 or swf_GetU32.
What I want is that swfdump will gracefully fail processing the DoAction tag when it gets such an error, not crash my windows :-)

Can you please fix it?
Thanks!
RK.


reply via email to

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