Memset the xtra url to assure null termination
Fixes a potential crash in jni layer caused by invalid characters in the string. CRs-fixed: 555829 Change-Id: I03ae100c4b7e65c95bac5841fcf00b27e2940741
This commit is contained in:
parent
d32cd2946d
commit
a0c2f679ee
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