From 2772a342ae5bc26027c3e9c75b2b611eb285a99d Mon Sep 17 00:00:00 2001 From: Markus Volk Date: Fri, 31 Jan 2020 22:20:04 +0100 Subject: [PATCH] controlapi.cpp: fix -Wstringop-truncation warning Signed-off-by: Markus Volk Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/e9c7a242f7b458a9855cd48b14f7afe364de32ac Author: Markus Volk Date: 2020-01-31 (Fri, 31 Jan 2020) ------------------ This commit was generated by Migit --- src/nhttpd/tuxboxapi/controlapi.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nhttpd/tuxboxapi/controlapi.cpp b/src/nhttpd/tuxboxapi/controlapi.cpp index c64e70f49..9e9d82a07 100644 --- a/src/nhttpd/tuxboxapi/controlapi.cpp +++ b/src/nhttpd/tuxboxapi/controlapi.cpp @@ -2476,7 +2476,7 @@ void CControlAPI::SendAllCurrentVAPid(CyhookHandler *hh) { if(!(init_iso)) { - strncpy( pids.APIDs[i].desc, _getISO639Description( pids.APIDs[i].desc ),DESC_MAX_LEN ); + strncpy( pids.APIDs[i].desc, _getISO639Description( pids.APIDs[i].desc ),DESC_MAX_LEN-1 ); } hh->printf("%05u %s %s\n",it->pid,pids.APIDs[i].desc,pids.APIDs[i].is_ac3 ? " (AC3)": pids.APIDs[i].desc,pids.APIDs[i].is_aac ? "(AAC)" : pids.APIDs[i].desc,pids.APIDs[i].is_eac3 ? "(EAC3)" : " "); i++;