28.06.2016, 17:21
Variables being overwritten is nearly always caused by a stack or buffer overflow; putting more things on the stack than it has room to store, or somehow storing a larger string in a variable than its capacity allows.