bug 174189, fix flawfinder warning, r=harishd, sr=dveditz
This commit is contained in:
Родитель
7b5407b246
Коммит
9f6dfe1a2b
|
@ -459,7 +459,7 @@ nsLocaleService::GetLocaleFromAcceptLanguage(const char *acceptLanguage, nsILoca
|
|||
}
|
||||
}
|
||||
for ( i=0 ; i<countLang ; i++ ) {
|
||||
strcpy(acceptLanguageList[i],ptrLanguage[i]);
|
||||
PL_strncpyz(acceptLanguageList[i],ptrLanguage[i],NSILOCALE_MAX_ACCEPT_LENGTH);
|
||||
}
|
||||
|
||||
} else {
|
||||
|
@ -468,7 +468,7 @@ nsLocaleService::GetLocaleFromAcceptLanguage(const char *acceptLanguage, nsILoca
|
|||
cPtr = nsCRT::strtok(input,",",&cPtr2);
|
||||
while (cPtr) {
|
||||
if (strlen(cPtr)<NSILOCALE_MAX_ACCEPT_LENGTH) { /* ignore if too long */
|
||||
strcpy(acceptLanguageList[countLang++],cPtr);
|
||||
PL_strncpyz(acceptLanguageList[countLang++],cPtr,NSILOCALE_MAX_ACCEPT_LENGTH);
|
||||
if (countLang>=NSILOCALE_MAX_ACCEPT_LENGTH) break; /* quit if too many */
|
||||
}
|
||||
cPtr = nsCRT::strtok(cPtr2,",",&cPtr2);
|
||||
|
|
Загрузка…
Ссылка в новой задаче