what would the script be vulnerable to?

If a developer wrote the following code, what would the script be vulnerable to?
#include <stdio.h>
int main(int argc, char **argv)
{
int number = 5;
printf(argv[1]);
putchar(‘\n’);
printf(“number (%p) is equal to %d\n”, &value, value);
}

If a developer wrote the following code, what would the script be vulnerable to?
#include <stdio.h>
int main(int argc, char **argv)
{
int number = 5;
printf(argv[1]);
putchar(‘\n’);
printf(“number (%p) is equal to %d\n”, &value, value);
}

A.
Buffer overflow

B.
Format string attack

C.
Query string manipulation

D.
SQL injection

Explanation:



Leave a Reply 0

Your email address will not be published. Required fields are marked *