Maybe someone from NetBurner will chime in here, but I can't see any reason not to use the more modern (yet tested over 20 years) versions from the C++ lib. Using the c++ libs instead of the old c libs will ALWAYS avoid both of these potential crashes. Why not just use the much safer ostringstream? In your example if SensorData.Calculated is not a float it will cause a crash, if you overflow DispBuffer it will cause a crash. Sprintf and all its relations are type unsafe. First let me put on my broken record (and this isn't directed directly at Dave)
0 Comments
Leave a Reply. |