First of all I am not very familiar with the stack and heap.
In a lot of programs I see that pointers are checked for NULL
. But that doesn't prevent a crazy address like 0x002011
to be passed.
My question: is there "safe" address interval, that I can check a pointer belongs to and be reasonably sure it's valid, before dereferencing it?