From 75c63f53fcbe86e362a9b95945a678b5b19c1789 Mon Sep 17 00:00:00 2001 From: stojce Date: Tue, 16 Apr 2013 17:38:34 +0200 Subject: [PATCH] use safe version of `sprintf` --- interface/src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/src/main.cpp b/interface/src/main.cpp index 16a0d9a43d..4368d7fd97 100644 --- a/interface/src/main.cpp +++ b/interface/src/main.cpp @@ -896,7 +896,7 @@ void display(void) float startupTime = (usecTimestampNow() - usecTimestamp(&applicationStartupTime))/1000000.0; justStarted = false; char title[30]; - sprintf(title, "Interface: %4.2f seconds", startupTime); + snprintf(title, 30, "Interface: %4.2f seconds", startupTime); glutSetWindowTitle(title); } }