text: // Demonstartion of 'stack smashing' where buffer two overflows into buffer one. Input data into buffer from command line.
  
  #include <stdio.h>
  #include <string.h>
  
  int main(int argc, char *argv[]){
  	int value = 6;
  	char buffer_one[9], buffer_two[9];		// Buffer initialization.
  	
  	strcpy(buffer_one, "one"); 				// Indicate buffer one.
  	strcpy(buffer_two, "two");				// Indicate buffer two.
  	
  	printf("[BEFORE] buffer_two is at %p and contains \'%s\'\n", buffer_two, buffer_two);
  	printf("[BEFORE] buffer_one is at %p and contains \'%s\'\n", buffer_one, buffer_one);
  	printf("[BEFORE] value is at %p and is %d (0x%08x)\n", &value, value, value);
  
  	printf("\n[STRCPY] copying %lu bytes into buffer_two\n\n",  strlen(argv[1]));
  	strcpy(buffer_two, argv[1]); 			// Copy first argument into buffer_two.
  	
  	printf("[AFTER] buffer_two is at %p and contains \'%s\'\n", buffer_two, buffer_two);
  	printf("[AFTER] buffer_one is at %p and contains \'%s\'\n", buffer_one, buffer_one);
  	printf("[AFTER] value is at %p and is %d (0x%08x)\n", &value, value, value);
  }
  