How to conduct stack/memory overflow with javascript?
Like the following:
#include <stdio.h>
#include <string.h>
void bad() {
print开发者_如何学Pythonf("Oh shit really bad~!\r\n");
}
void foo() {
char overme[4] = "WOW";
*(int*)(overme+8) = (int)bad;
}
int main() {
foo();
}
Well, first you find a JavaScript runtime with a bug in its memory management system…
The short answer is that you can't. JavaScript doesn't let you manually manage your memory allocation.
function Recurse()
{
Recurse();
}
精彩评论