Re: Casting
- From: dummy <dummyguy@xxxxxxx>
- Date: Wed, 26 Dec 2007 03:36:24 -0800 (PST)
Thanx to All for the comments & suggestions!
An excerption from the old thesis on the J2ME security conf follows:
....
mtab = new byte[12];
/* set table size to 2^32-1 */
mtab[9] = mtab[9] = mtab[10] = mtab[11] = (byte)0xFF;
/* get addr of fake array obj header */
int base = BlackBox.cast2int(mtab) + 0x0C;
/* do the cast */
static int mem[] = cast2arrayOfBytes(base);
((int)mem[ADDR - base - 0x0C])&0xFF can be now read or written what
will result in a read or write access to the memory location ADDR
....
dummy
.
- Follow-Ups:
- Re: Casting
- From: Eric Sosman
- Re: Casting
- From: dummy
- Re: Casting
- References:
- Casting
- From: dummy
- Re: Casting
- From: Daniel Pitts
- Re: Casting
- From: dummy
- Re: Casting
- From: Lew
- Casting
- Prev by Date: Re: Copy files in java gives me out of memory error
- Next by Date: Re: Casting
- Previous by thread: Re: Casting
- Next by thread: Re: Casting
- Index(es):