Why Does This Not Crash?
Hello C/C++ experts,
I write the following code
What could be the reason?
Re: Why Does This Not Crash?
The language doesn't define how those two are related, merely that each is contiguous and that element n+1 is one element higher in memory than element n. If you have a common implementation, inside a function, and that function uses the stack, which it would be stupid to count on, b will write into a.
I would suggest that if you want to play with such stuff, get into machine language. You'll find lots of undefined behavior in C/C++ accidentally, no need to go looking for a way to turn a cotton purse into sow's excrement; nor will I, personally, teach you how to write exploits.
|All times are GMT +5.5. The time now is 08:53.|