An internally developed file-monitoring system identified the following excerpt as causing a program to crash often: char filedata[100]; fp = fopen(`access.log`, `r`); srtcopy (filedata, fp); printf (`%sn`, filedata); Which of the following should a security analyst recommend to fix the issue?

QuestionsCategory: CS0-002An internally developed file-monitoring system identified the following excerpt as causing a program to crash often: char filedata[100]; fp = fopen(`access.log`, `r`); srtcopy (filedata, fp); printf (`%sn`, filedata); Which of the following should a security analyst recommend to fix the issue?
Admin Staff asked 9 months ago
An internally developed file-monitoring system identified the following excerpt as causing a program to crash often: char filedata[100]; fp = fopen(`access.log`, `r`); srtcopy (filedata, fp); printf (`%sn`, filedata);
Which of the following should a security analyst recommend to fix the issue?

A. Open the access.log file in read/write mode.

B. Replace the strcpy function.

C. Perform input sanitization.

D. Increase the size of the file data butter.








 

Suggested Answer: B

Community Answer: B



This question is in CS0-002 CompTIA Cybersecurity Analyst (CySA+) Exam
For getting CompTIA Cybersecurity Analyst (CySA+) Certificate


Disclaimers:
The website is not related to, affiliated with, endorsed or authorized by CompTIA. 
Trademarks, certification & product names are used for reference only and belong to CompTIA.
The website does not contain actual questions and answers from CompTIA's Certification Exams.

Next Post

Recommended

Welcome Back!

Login to your account below

Create New Account!

Fill the forms below to register

Retrieve your password

Please enter your username or email address to reset your password.