Consider the C program as below. There is a problem with this program which could lead to a cyber-attack on the program:
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
intmain(intargc, char*argv[])
{
char processName[5];
if(argc<2)
{
printf(“Not to be executed….\n”);
printf(“Syntax: %s <characters>\n”,argv[0]);
exit(0);
}
strcpy(processName,argv[1]);
printf(“The Process Name is = %s\n”,processName);
return 0;
}
What kind of problem is it?
- Format String Vulnerability Problem
- Heap Overflow Problem
- Integer Overflow Problem
- Buffer Overflow Problem