Platinum Partner

C - Example Buffer OverFlow

/*
 *
 * Esempio di Buffer Overflow ...
 */


#include 
#include 

int main(int argc, char *argv[])
{
	char *buffer1 = (char *)calloc(5, sizeof(char));
	char *buffer2 = (char *)calloc(15, sizeof(char));
	char *tmp;
	
	strcpy(buffer2, "ls -a --color");
	strcpy(buffer1, argv[1]);

	// Indirizzi di memoria...
	printf("%p <-- buffer1\n", buffer1);
	printf("%p <-- buffer2\n", buffer2);
	printf("\n\n");

	// Stampa indirizzi...
	printf("Start code....\n");
	tmp=buffer1;
	while(tmp
{{ tag }}, {{tag}},

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}
{{ parent.authors[0].realName || parent.author}}

{{ parent.authors[0].tagline || parent.tagline }}

{{ parent.views }} ViewsClicks
Tweet

{{parent.nComments}}