upnpbrowser.cpp: increase destination array to avoid possible truncation

Signed-off-by: MarkusVolk <f_l_k@t-online.de>
This commit is contained in:
MarkusVolk
2020-01-10 06:56:13 +01:00
committed by Thilo Graf
parent b68ed042c0
commit 527f3ec1a2

View File

@@ -1281,8 +1281,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);