In VS 2010, open the project property pages, go to C/C++ -> Code Generation. There is an option called "Buffer Security Check" (/GS) which may be what you're talking about. You can disable it right there, or add "/GS-" on the command line to disable it.
P.S.: the help page on /GS offers additional information, among other things specific circumstances under which the compiler does not extend the buffers, e. g. when the first line of a function is inline assembly, or when it hs the keyword
naked
:
__declspec( naked ) int func( formal_parameters ) {}
Check out
naked
in the help pages for more info.