h4cker/buffer_overflow_example/bad_code.c

24 lines
335 B
C
Raw Normal View History

2018-02-15 23:27:16 +00:00
#include <stdio.h>
void secretFunction()
{
printf("Omar's Crappy Function\n");
printf("This is a super secret function!\n");
}
void echo()
{
char buffer[20];
printf("Please enter your name below:\n");
scanf("%s", buffer);
printf("You entered: %s\n", buffer);
}
int main()
{
echo();
return 0;
}