fix AddressSanitizer: strncpy-param-overlap: memory ranges

Origin commit data
------------------
Commit: d96f15fb6c
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2016-02-24 (Wed, 24 Feb 2016)
This commit is contained in:
Jacek Jendrzej
2016-02-24 18:46:12 +01:00
parent 64fdadc288
commit 987757d215
3 changed files with 50 additions and 29 deletions

View File

@@ -2216,11 +2216,12 @@ void CControlAPI::SendAllCurrentVAPid(CyhookHandler *hh)
}
else
{
std::string tmp_desc = pids.APIDs[j].desc;
if(!(init_iso))
{
strncpy( pids.APIDs[j].desc, _getISO639Description( pids.APIDs[j].desc ),DESC_MAX_LEN );
tmp_desc = _getISO639Description( pids.APIDs[j].desc );
}
hh->printf("%05u %s %s\n",pids.APIDs[j].pid,pids.APIDs[j].desc,pids.APIDs[j].is_ac3 ? " (AC3)": pids.APIDs[j].desc,pids.APIDs[j].is_aac ? "(AAC)" : pids.APIDs[j].desc,pids.APIDs[j].is_eac3 ? "(EAC3)" : " ");
hh->printf("%05u %s %s\n",pids.APIDs[j].pid,tmp_desc.c_str(),pids.APIDs[j].is_ac3 ? " (AC3)": tmp_desc.c_str(),pids.APIDs[j].is_aac ? "(AAC)" : tmp_desc.c_str(),pids.APIDs[j].is_eac3 ? "(EAC3)" : " ");
}
eit_not_ok=false;
break;