mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-19 08:15:31 +00:00
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:
parent
a105826a55
commit
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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user