Q57
Single choice
Based on the results of a SAST report on a legacy application, a security engineer is reviewing the following snippet of code flagged as vulnerable:
Which of the following is the vulnerable line of code that must be changed?
[01] #include <stdio.h>
[02] #include <string.h>
[03] ...
[04] char input[256] =
"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"; [05] ...
[06] char transmit[20] = "0000";
[07] char *ret_xmit;
[08] printf("To be submitted: \"%s\"\n", input);
[09] result in ret_xmit
[10] ret_xmit = strcpy(transmit, input);
[11] return 0;
[12] }
[13]