[Paraview-developers] strcpy and other bad actors

Ben Boeckel ben.boeckel at kitware.com
Mon Apr 10 09:48:20 EDT 2017


On Fri, Apr 07, 2017 at 20:41:52 +0000, Scott, W Alan wrote:
> It made me start to wonder - do we care about ParaView (which of
> course runs in user space).  I just looked, and there are about 1800
> uses of strcpy in ParaView.  Is that an issue?

As with many thing, it depends :) . I wouldn't object to moving to at
least `strncpy`, but I suspect that just switching over to `std::string`
would just be easier in the long run (since even `strncpy` has buffer
calculations which can be done improperly). That may require some
reworking around each change though, so is not likely scriptable.

--Ben


More information about the Paraview-developers mailing list