Access in invalid stack

From Appmethod Topics
Jump to: navigation, search

Go Up to Access Errors

An Access In Invalid Stack error occurs when an attempt is made to access memory below the bottom of the stack. This is different from Access Underrun, since the memory is allocated on the stack and not in the heap.

#include <tchar.h>
#pragma hdrstop

void myf()
   char name[20];
   strcpy(&name[-1], "someone"); // error

int _tmain(int argc, _TCHAR* argv[])
	return 0;