all groups > visual c libraries > november 2003 >
You're in the

visual c libraries

group:

Buffer overrun w/ new libraries


Buffer overrun w/ new libraries Brian Corcoran
11/7/2003 8:40:37 AM
visual c libraries: Hi,

I'm dynamically calling the HTMLHelp function and getting
a Buffer Overrun in the VC++ runtime library. This
terminates the application. It only happens when
building for Release (VS .NET 2003). The thing is, the
code is unchanged from when it worked with VC++ 6.0.
The Help file is also unchanged.

Has anyone seen this kind of behavior and have any ideas
what might be happening ? Thanks in advance.

Buffer overrun w/ new libraries Sushil Srivastava
11/10/2003 2:06:53 PM
Hi Brian,

There are some compiler flags like start with "RTC?",
these flags detect buffer over run & under run. Check your
project C++ setting "Code generation" -> "Basic Runtime
Check". Use the "default" one, build your app. Give it a
try. If it works then most probabily your code is buggy

Let me know if it helps
sushilsrivastava@rocketmail.com
Sushil
[quoted text, click to view]
Buffer overrun w/ new libraries Brian Corcoran
11/12/2003 5:50:49 AM
Sushil,

Thank you for the advice. I was running with default,
but enabling the stack check allowed me to find the
problem. I had a dynamically obtained Windows function
pointer cast without __stdcall. The __cdecl default
behavior was messing up the stack. I don't think I would
have found it without the stack checking.

Brian

[quoted text, click to view]
AddThis Social Bookmark Button