Merge "Memset the xtra url to assure null termination"
This commit is contained in:
commit
673b23822f
1 changed files with 1 additions and 0 deletions
|
@ -875,6 +875,7 @@ LocEngReportXtraServer::LocEngReportXtraServer(void* locEng,
|
|||
LocMsg(), mLocEng(locEng), mMaxLen(maxlength),
|
||||
mServers(new char[3*(mMaxLen+1)])
|
||||
{
|
||||
memset(mServers, 0, 3*(mMaxLen+1));
|
||||
strlcpy(mServers, url1, mMaxLen);
|
||||
strlcpy(&(mServers[mMaxLen+1]), url2, mMaxLen);
|
||||
strlcpy(&(mServers[(mMaxLen+1)<<1]), url3, mMaxLen);
|
||||
|
|
Loading…
Reference in a new issue