1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#include <stdio.h> #include <string.h> void badMemoryAccess() { int *p = (int*) 0x4252352; printf("Bad memory access now!\n"); *p = 5; } int main(int argc, char *argv[]) { badMemoryAccess(); return 0; }