PrepAway - Latest Free Exam Questions & Answers

What is Neil trying to create here?

Neil is almost finished developing a Web-based inventorytracking application for a company he is
working for under contract. Neil finds out that the company wants to pay him half of what they had
agreed upon so he is very angry. Neil decides to insert the following code into his application.
What is Neil trying to create here?
#include <stdio.h>
#include <string.h>
int main(int argc, char *argv[])
{
char buffer[10];
if (argc < 2)
{

fprintf(stderr, “USAGE: %s
string\n”, argv[0]);
return 1;
}
strcpy(buffer, argv[1]);
return 0;
}

PrepAway - Latest Free Exam Questions & Answers

A.
UML malformed string

B.
Format string bug

C.
Buffer underflow

D.
Buffer overflow

Explanation:


Leave a Reply