From 2f94d1c47e9fea7e1dc43c6a8b0da006f1a3d9c2 Mon Sep 17 00:00:00 2001 From: Markus Volk Date: Fri, 10 Jan 2020 22:30:25 +0100 Subject: [PATCH] upnpbrowser.cpp: increase destination array to avoid possible truncation Signed-off-by: MarkusVolk Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/42a64b01d93c84dad52e228bbe33076d97519a2e Author: Markus Volk Date: 2020-01-10 (Fri, 10 Jan 2020) --- src/gui/upnpbrowser.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/upnpbrowser.cpp b/src/gui/upnpbrowser.cpp index fbeb3e46a..a469f5e65 100644 --- a/src/gui/upnpbrowser.cpp +++ b/src/gui/upnpbrowser.cpp @@ -1286,8 +1286,8 @@ void CUpnpBrowserGui::updateTimes(const bool force) } //printf("updateTimes: force %d updatePlayed %d\n", force, updatePlayed); - char play_time[8]; - snprintf(play_time, 7, "%ld:%02ld", m_time_played / 60, m_time_played % 60); + char play_time[14]; + snprintf(play_time, sizeof(play_time), "%ld:%02ld", m_time_played / 60, m_time_played % 60); if (updatePlayed){ timebox.setText(play_time, CTextBox::CENTER);