upnpbrowser.cpp: increase destination array to avoid possible truncation

Signed-off-by: MarkusVolk <f_l_k@t-online.de>


Origin commit data
------------------
Commit: 42a64b01d9
Author: Markus Volk <f_l_k@t-online.de>
Date: 2020-01-10 (Fri, 10 Jan 2020)
This commit is contained in:
Markus Volk
2020-01-10 22:30:25 +01:00
committed by vanhofen
parent facaa47225
commit 2f94d1c47e

View File

@@ -1286,8 +1286,8 @@ void CUpnpBrowserGui::updateTimes(const bool force)
} }
//printf("updateTimes: force %d updatePlayed %d\n", force, updatePlayed); //printf("updateTimes: force %d updatePlayed %d\n", force, updatePlayed);
char play_time[8]; char play_time[14];
snprintf(play_time, 7, "%ld:%02ld", m_time_played / 60, m_time_played % 60); snprintf(play_time, sizeof(play_time), "%ld:%02ld", m_time_played / 60, m_time_played % 60);
if (updatePlayed){ if (updatePlayed){
timebox.setText(play_time, CTextBox::CENTER); timebox.setText(play_time, CTextBox::CENTER);