From e732644d2ca246e9a6ea6d38f8d522b7d4e257ca Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Mon, 16 Nov 2020 09:04:41 +0100 Subject: [PATCH] streaminfo2.cpp: use separate var for filename output Avoids truncation warnings. Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/81dc6704ae7ab88875254bd3654c5a4e8471244d Author: Thilo Graf Date: 2020-11-16 (Mon, 16 Nov 2020) --- src/gui/streaminfo2.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/gui/streaminfo2.cpp b/src/gui/streaminfo2.cpp index 7a3603954..48e115c34 100644 --- a/src/gui/streaminfo2.cpp +++ b/src/gui/streaminfo2.cpp @@ -838,7 +838,7 @@ struct row void CStreamInfo2::paint_techinfo(int xpos, int ypos) { - char buf[100]; + char buf[100], buf2[259]; bool has_vpid = false; bool is_webchan = false; int xres = 0, yres = 0, aspectRatio = 0, framerate = -1, i = 0; @@ -1147,15 +1147,15 @@ void CStreamInfo2::paint_techinfo(int xpos, int ypos) r.key = "E2 Logo 1"; r.key += ": "; - snprintf(buf, sizeof(buf), "%s.png", e2filename1); - r.val = buf; + snprintf(buf2, sizeof(buf2), "%s.png", e2filename1); + r.val = buf2; v.push_back(r); if ((std::string) e2filename1 != (std::string) e2filename2) { r.key = "E2 Logo 2"; r.key += ": "; - snprintf(buf, sizeof(buf), "%s.png", e2filename2); - r.val = buf; + snprintf(buf2, sizeof(buf2), "%s.png", e2filename2); + r.val = buf2; v.push_back(r); } }