News for hackers. Stuff that matters.
Re:Your code should be taken out back, lined up against a wa... by scdlbx on Tuesday July 27, 2010 @02:43PM (#1552239)
Actually, since st1 is a char* and the sizeof char is 1, that is a valid declaration. It just probably isn't doing what the writer expects. It allocates 5000 bytes and then moves the pointer to point at the very last byte.

edit: Though free()ing it would not work so well until you move the pointer back to the beginning of the 5000 bytes.

Re:Your code should be taken out back, lined up against a wa... by azim on Tuesday July 27, 2010 @03:58PM (#1552524)
I think that's what the writer expected. On x86 the stack starts at a high address and grows downward to a lower address.