Patent ID: 6993663

Claim:
A method for preventing overrun of an input data buffer within a program having the it data buffer on a stack data structure, the program executing on a computing system, the method comprising: pushing all arguments to a function onto the stack data structure; pushing a return address onto the stack data structure for use in obtaining a memory address for an instruction to be executed upon completion of the function; pushing onto the stack data structure a security token, the security token comprising a randomly generated data value determined using a random number generator once each time the program is executed, wherein the random number generator generates the randomly generated data value using a snapshot of a system clock within the computing system obtained before the program first accepts input data; allocating memory locations on the stack data structure for use as local variables within the function; completing instructions within the function; retrieving the security token value from the stack data structure; and if the retrieved security token value is identical to the randomly generated data value, returning from the function using the return address stored on the stack data structure.