Forward kinematic chain example--error in windows, Run-Time Check Failure #2 -Stack around the variable 'fksolver' was corrupted

The example was compiled. When I run it, it look Okay except when the main return. The following error happened:

 "Run-Time Check Failure #2 - Stack around the variable 'fksolver' was corrupted."
It looks like some kine of pointer out of range. I did not change any code.

Can anyone give me some help?

My operating system is windows 7 and development environment is visual studio 2008.

Now I can use ChainFkSolverPos_recursive. Every time when return from the function which called JntToCart function, I will get this error and software crushed.

 "Run-Time Check Failure #2 - Stack around the variable 'fksolver' was corrupted."
Please give me a hand

Problem solved

I solved this problem by disable "Run-Time Check". Now this problem will not happen. But I don't know if this is a correct solution.