Interesting C thingy
lfs-01 at thewizardstower.org
Mon Aug 9 11:09:01 PDT 2004
* Jason Gurtz <jason at tommyk.com> [2004-08-09 17:55]:
> On 8/9/2004 12:56, Miguel Bazdresch wrote:
> > printf("%c\n",9[str]); only prints the newline, i expected it to
> > segfault :)
> Hmm, well maybe, maybe not. Clearly it's beyond the bounds of the array
> which is leagl. But you don't know what you're going to get. Maybe
> you were lucky and got \0?
Does that mean reading unallocated memory is fine? What about kernel
memory, or the memory where some guy's (logged to the same machine) gpg
key is stored?
Sorry about this display of ignorance :)
More information about the lfs-chat