Quantcast
Channel: Tips for golfing in C - Code Golf Stack Exchange
Viewing all articles
Browse latest Browse all 67

Answer by ceilingcat for Tips for golfing in C

$
0
0

Exploit ASLR

On systems with ASLR (Address Space Layout Randomization), the address of a stack variable can be used as a one time pseudorandom number. Instead of something like...

srand(time(0));

...try something like

srand(&x)

...where the address of x (hopefully on the stack) is unique each time the program is run.


Viewing all articles
Browse latest Browse all 67

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>