Bug 1363011 - [Static Analysis] Buffer not null terminated in int NS_main(int argc, NS_tchar **argv). r=mhowell

Patch wrote by: Santiago Paez [:tiago]

Differential Revision: https://phabricator.services.mozilla.com/D25747

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Andi-Bogdan Postelnicu 2019-04-02 15:28:14 +00:00
Родитель c57ed64e58
Коммит e10003d9ee
1 изменённых файлов: 1 добавлений и 0 удалений

Просмотреть файл

@ -2770,6 +2770,7 @@ int NS_main(int argc, NS_tchar **argv) {
}
// The directory containing the update information.
NS_tstrncpy(gPatchDirPath, argv[1], MAXPATHLEN);
gPatchDirPath[MAXPATHLEN - 1] = NS_T('\0');
// This check is also performed in workmonitor.cpp since the maintenance
// service can be called directly.