complicated pointer *(long*)&stuffing[i]=0x80484bb
Posted on 2004-09-14
I am studying assembly, and have the shellcoder's handbook, where there is the following example on page 21 of how to make an array of 44 bytes, where each byte is filled with "something" (think it's 0x80484bb) but given the following code for this
int i = 0;
for (i=0; i<=40; i+=4)
*(long *) &stuffing[i] = 0x80484bb;
okay, i know that he is putting the address value of 0x80484bb somewhere .... but how can he magically cast a char to a long? the question is, "what is going on here?" is he changing the char * stuffing into (char *)(Long *) stuffing, meaning making the &stuffing ... can somebody break down for me *(long *) &stuffing[i]?