[vtk-developers] Visual Studio 8 "insecure method" warnings

David Gobbi dgobbi at atamai.com
Wed Feb 15 17:30:55 EST 2006


Hi Everyone,

The VC++ 8.0 compiler warns about methods like strcpy, sscanf, sprintf,
because they lead to insecure code.  The microsoft documentation on the
issues is here:
http://msdn.microsoft.com/msdnmag/issues/05/05/SafeCandC/default.aspx
though we can't use their microsoft-specific solution.

I have modified the VTK .h files so that packages can be built against
VTK without these warnings showing up, and will be checking in the
changes tomorrow morning.  The vtkSetString() macro in vtkSetGet.h was
the main offender.

There are plenty of uses of strcpy in the .cxx files, too.  I've added
a bug report (#2889) to cover this.

 - David





More information about the vtk-developers mailing list