Skip to content

Instantly share code, notes, and snippets.

@foxbit19
Created September 9, 2022 10:00
Show Gist options
  • Save foxbit19/2cd2d55c8715774fbc09982d09d6e825 to your computer and use it in GitHub Desktop.
Save foxbit19/2cd2d55c8715774fbc09982d09d6e825 to your computer and use it in GitHub Desktop.
Simple C program to say welcome to the article reader
#include <stdio.h>
#include <string.h>
/**
* Says hello to the new reader
*/
void welcomeReader(char *inputName) {
char name[100];
strcpy(name, inputName);
printf("Welcome %s to the buffer overflow article! Happy reading!\n", name);
}
/**
* The main function, it takes the name of the reader as argument
*/
int main(int argc, char *argv[]) {
welcomeReader(argv[1]);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment