It may work on some system, sometimes, if you're lucky and the garbage value contained in the initialized pointer point to some valid memory. However, even if it doesn't crash, you write on some other process memory which may alter the way they work.
I had a funny experience once, I was working on a crypto routine but I messed the check to find the end of the buffer. The code encrypted memory until it crashed, and in the interval, it found the buffer where Windows stored the bitmap of the screen, I ended up with a nice artefact.
I guess such lucky context only happened on 32bits system, or if ASLR is disabled.
You're using MinGW and if I recall, it neither compiles in 64 bit by default, nor enable the use of ASLR, so if your friend had around 4 GB of RAM and his computer was running for some time, it can explains what you got. I guess the main difference between your Windows 7 and his are the quantity of RAM and the program you're running.