Aquí se muestra un ejemplo en c:¿Cómo llevar a cabo el desbordamiento del búfer en PHP/Python?
#include <stdio.h>
#include <string.h>
void bad() {
printf("Oh shit really bad~!\r\n");
}
void foo() {
char overme[4] = "WOW";
*(int*)(overme+8) = (int)bad;
}
int main() {
foo();
}