first i see a bunch or random data, which i expect, then a bunch of directory listings and stuff. Don't know what to make of it.I take it that i'm looking at the stack and data left behind by something else and with the readable stuff, it has flowed into another part of memory before the segfault?Could anyone enlighten me?

Goatboy wrote:Oh, that's simple. All you need to do is dedicate many years of your life to studying security.

first i see a bunch or random data, which i expect, then a bunch of directory listings and stuff. Don't know what to make of it.I take it that i'm looking at the stack and data left behind by something else and with the readable stuff, it has flowed into another part of memory before the segfault?Could anyone enlighten me?

Just from looking at it, without running it through GDB or anything else, I'd say that you're right and it is running through the stacks readable memory. You have an infinite loop that is listing through all the memory addresses and printing out their data, I'm assuming eventually you'd hit the stack, or some other structure and are printing out it's data.

Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. -Rick Cook