Demo entry 6661428

栈溢出攻击

   

Submitted by wangbo on Nov 22, 2017 at 02:29
Language: C. Code size: 506 Bytes.

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

void fun1(void)
{
        printf("Hello World\n");
        exit(0);
}

int fun2(void)
{
        char arry[4] = {0};
	char acSrc[] = {0xfa, 0x09, 0xae, 0x51, 0x67, 0xf0, 0x0d, 0xb9, 0xff, 0x7b, 0x84, 0x04, 0x08};
 	char i = 0;       
	memcpy(arry, acSrc, sizeof(acSrc));
	
        return 0;
}

int main(void)
{
        int i = 1;
        int j = 2;

        fun2();
        printf("i + j = %d\n", i + j);
	return 0;
}

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).