From 6aa3fc767d9fcc225276d3fdbf660c0a2353ba5a Mon Sep 17 00:00:00 2001 From: "Kevin M. Rosenberg" Date: Mon, 12 Feb 2018 01:30:19 -0700 Subject: [PATCH] Fix upstream bug of too small of a sprintf call --- tools/Display/displayprojection.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/Display/displayprojection.cpp b/tools/Display/displayprojection.cpp index 5cfaa60..c477393 100644 --- a/tools/Display/displayprojection.cpp +++ b/tools/Display/displayprojection.cpp @@ -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"); -- 2.34.1