Fix upstream bug of too small of a sprintf call
authorKevin M. Rosenberg <kevin@rosenberg.net>
Mon, 12 Feb 2018 08:30:19 +0000 (01:30 -0700)
committerKevin M. Rosenberg <kevin@rosenberg.net>
Mon, 12 Feb 2018 08:30:19 +0000 (01:30 -0700)
tools/Display/displayprojection.cpp

index 5cfaa60507956fcfd0113679f8cd35f2d793b737..c4773939193d537cb14c6988174b6acb91e87653 100644 (file)
@@ -162,8 +162,8 @@ displayprojection::displayprojection(QWidget* parent, const char* name, bool mod
 
     lowthresh = new QLineEdit(this, "lowthresh");
     lowthresh->setGeometry(QRect(5, 260, 80, 30));
-    char s[6];
-    sprintf(s, "%7.4f", minval);
+    char s[16];
+    snprintf(s,sizeof(s)-1,"%7.4f", minval);
     lowthresh->setText(s);
 
     setlowthreshbutton = new QPushButton(this, "setlowthreshbutton");