зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1577273 - Use strnlen to test if source URLs are too long, r=tcampbell.
Differential Revision: https://phabricator.services.mozilla.com/D43848 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
a105826a55
Коммит
f00e1f1678
|
@ -2276,7 +2276,8 @@ static bool RememberSourceURL(JSContext* cx, HandleScript script) {
|
|||
}
|
||||
|
||||
const char* filename = script->filename();
|
||||
if (!filename || strlen(filename) > SourceURLMaxLength) {
|
||||
if (!filename ||
|
||||
strnlen(filename, SourceURLMaxLength + 1) > SourceURLMaxLength) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче