From a91a27900c2b1448f26d6cdcf53a75dbe498170b Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Fri, 26 Dec 2014 22:13:59 +0100 Subject: [PATCH] dboxinfo: fix buffer size, avoid overflow --- src/gui/dboxinfo.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gui/dboxinfo.cpp b/src/gui/dboxinfo.cpp index b4af112ca..3a728289a 100644 --- a/src/gui/dboxinfo.cpp +++ b/src/gui/dboxinfo.cpp @@ -392,14 +392,14 @@ void CDBoxInfoWidget::paint() upminutes %= 60; if (updays) { - snprintf(ubuf, sizeof(sbuf), "%d day%s, ", updays, (updays != 1) ? "s" : ""); + snprintf(ubuf, sizeof(ubuf), "%d day%s, ", updays, (updays != 1) ? "s" : ""); strcat(sbuf, ubuf); } if (uphours) { - snprintf(ubuf, sizeof(sbuf), "%d hour%s, ", uphours, (uphours != 1) ? "s" : ""); + snprintf(ubuf, sizeof(ubuf), "%d hour%s, ", uphours, (uphours != 1) ? "s" : ""); strcat(sbuf, ubuf); } - snprintf(ubuf,sizeof(sbuf), "%d minute%s", upminutes, (upminutes != 1) ? "s" : ""); + snprintf(ubuf,sizeof(ubuf), "%d minute%s", upminutes, (upminutes != 1) ? "s" : ""); strcat(sbuf, ubuf); snprintf(ubuf, sizeof(ubuf), "%s: ", g_Locale->getText(LOCALE_EXTRA_DBOXINFO_LOAD));